From 149778d30bdfea03ca06e02781ab90e081b38460 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 2 Apr 2026 11:59:32 +0800 Subject: [PATCH] ++ --- .../fetch_local_performance.py | 27 +++++++++++++++++++ .../获取odoo中模拟后的alpha性能 | 0 2 files changed, 27 insertions(+) create mode 100644 fetch_local_performance/fetch_local_performance.py create mode 100644 fetch_local_performance/获取odoo中模拟后的alpha性能 diff --git a/fetch_local_performance/fetch_local_performance.py b/fetch_local_performance/fetch_local_performance.py new file mode 100644 index 0000000..915bed9 --- /dev/null +++ b/fetch_local_performance/fetch_local_performance.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +import xmlrpc.client +import os +import sys +import time +from datetime import datetime, timedelta + +# Odoo 连接配置 +ODOO_URL = "http://192.168.31.41:32000" +DB_NAME = "quantify" +USERNAME = "rpc" +PASSWORD = "aaaAAA111" + +# RPC 客户端 +common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(ODOO_URL)) +uid = common.authenticate(DB_NAME, USERNAME, PASSWORD, {}) + +# 搜索 alpha.expression.line 模型, 条件 字段 performance 不为空, 并按 id 升序排序 +domain = [('performance', '!=', False)] +order = 'id asc' +expression_line_ids = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(ODOO_URL)).execute_kw( + DB_NAME, uid, PASSWORD, 'alpha.expression.line', 'search_read', + [domain, ['id', 'performance', 'name', 'expression_id']], + {'order': order} + ) + +print(expression_line_ids) \ No newline at end of file diff --git a/fetch_local_performance/获取odoo中模拟后的alpha性能 b/fetch_local_performance/获取odoo中模拟后的alpha性能 new file mode 100644 index 0000000..e69de29