From 76b7d00643211f85531eb05f5aa9ca01d5b74bd4 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Sat, 11 May 2024 15:35:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=A8=A1=E7=89=88=E7=B1=BB=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E6=88=90=E5=93=81=EF=BC=8C=E5=9D=AF=E6=96=99=EF=BC=8C=E8=A1=A8?= =?UTF-8?q?=E9=9D=A2=E5=B7=A5=E8=89=BA=E6=A8=A1=E7=89=88=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E5=BA=8F=E6=96=B0=E5=A2=9E=E8=BF=87=E6=BB=A42.=E8=A1=A8?= =?UTF-8?q?=E9=9D=A2=E5=B7=A5=E8=89=BA=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E9=80=82=E7=94=A8=E6=9D=90=E6=96=99=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/views/common_view.xml | 2 +- sf_manufacturing/models/model_type.py | 7 ++++--- sf_manufacturing/views/model_type_view.xml | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sf_base/views/common_view.xml b/sf_base/views/common_view.xml index e829274a..74e916a8 100644 --- a/sf_base/views/common_view.xml +++ b/sf_base/views/common_view.xml @@ -33,7 +33,7 @@ - + diff --git a/sf_manufacturing/models/model_type.py b/sf_manufacturing/models/model_type.py index 29357d02..10157f63 100644 --- a/sf_manufacturing/models/model_type.py +++ b/sf_manufacturing/models/model_type.py @@ -21,7 +21,8 @@ class ProductModelTypeRoutingSort(models.Model): _description = '成品工序排序' sequence = fields.Integer('Sequence') - route_workcenter_id = fields.Many2one('mrp.routing.workcenter') + route_workcenter_id = fields.Many2one('mrp.routing.workcenter', + domain=[('routing_type', 'in', ['装夹预调', 'CNC加工', '解除装夹'])]) is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat') # routing_type = fields.Selection([ @@ -54,7 +55,7 @@ class EmbryoModelTypeRoutingSort(models.Model): _description = '坯料工序排序' sequence = fields.Integer('Sequence') - route_workcenter_id = fields.Many2one('mrp.routing.workcenter') + route_workcenter_id = fields.Many2one('mrp.routing.workcenter', domain=[('routing_type', 'in', ['切割'])]) is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat') # routing_type = fields.Selection([ @@ -87,7 +88,7 @@ class SurfaceTechnicsModelTypeRoutingSort(models.Model): _description = '表面工艺工序排序' sequence = fields.Integer('Sequence') - route_workcenter_id = fields.Many2one('mrp.routing.workcenter') + route_workcenter_id = fields.Many2one('mrp.routing.workcenter', domain=[('routing_type', 'in', ['表面工艺'])]) is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat') # routing_type = fields.Selection([ diff --git a/sf_manufacturing/views/model_type_view.xml b/sf_manufacturing/views/model_type_view.xml index 8b1218a4..09877a83 100644 --- a/sf_manufacturing/views/model_type_view.xml +++ b/sf_manufacturing/views/model_type_view.xml @@ -37,7 +37,7 @@ - + @@ -48,18 +48,18 @@ - + - + - +