From 00922e3674466ba76f1e6e4ecb2df7730a0d9ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Tue, 24 Jun 2025 15:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=8D=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=AF=B9=E5=BA=94=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/controllers/controllers.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sf_machine_connect/controllers/controllers.py b/sf_machine_connect/controllers/controllers.py index de4a8a33..8316411e 100644 --- a/sf_machine_connect/controllers/controllers.py +++ b/sf_machine_connect/controllers/controllers.py @@ -866,6 +866,8 @@ class Sf_Dashboard_Connect(http.Controller): request.update_context(lang='zh_CN') plan_obj = request.env['sf.production.plan'].sudo() work_order_obj = request.env['mrp.workorder'].sudo() + # 获取mrp.workorder的state字段的selection内容 + state_dict = dict(request.env['mrp.workorder'].sudo()._fields['state'].selection) line_list = ast.literal_eval(kw['line_list']) begin_time_str = kw['begin_time'].strip('"') end_time_str = kw['end_time'].strip('"') @@ -964,14 +966,6 @@ class Sf_Dashboard_Connect(http.Controller): material_match = re.search(material_pattern, blank_name) material = material_match.group(1) if material_match else 'No match found' - state_dict = { - 'draft': '待排程', - 'done': '已排程', - 'processing': '生产中', - 'finished': '已完成', - 'ready': '待加工', - 'progress': '生产中', - } line_dict = { 'sequence': not_done_index,