From 7849ce63426170824a0963febe8b690b7599c0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 21 Apr 2025 11:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A8=A1=E5=9E=8BID=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 2 ++ sf_manufacturing/models/mrp_workorder.py | 2 ++ sf_manufacturing/views/mrp_workorder_view.xml | 1 + 3 files changed, 5 insertions(+) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 02125aca..7412c8d5 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1814,6 +1814,8 @@ class MrpProduction(models.Model): except Exception as e: logging.info('update_programming_state error:%s' % e) raise UserError("更新编程单状态失败,请联系管理员") + + model_id = fields.Char('模型id', related='product_id.model_id') # 编程记录 diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 8d5ecbf1..1a4ca008 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1774,6 +1774,8 @@ class ResMrpWorkOrder(models.Model): orderby=orderby, lazy=lazy ) + + model_id = fields.Char('模型id', related='production_id.model_id') class CNCprocessing(models.Model): diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index c1f165fd..5946509a 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -676,6 +676,7 @@ +