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 @@ +