From 2febc369bbedac8786b8b87d72362d0ae7dcaa84 Mon Sep 17 00:00:00 2001 From: guanhuan Date: Mon, 16 Jun 2025 13:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=B7=A5=E8=89=BA=E8=B7=AF?= =?UTF-8?q?=E7=BA=BF=E6=96=B0=E5=A2=9E=E8=A1=A8=E9=9D=A2=E5=B7=A5=E8=89=BA?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9C=80=E8=A6=81=E5=90=8C=E6=AD=A5=E5=88=B0?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=9A=84=E5=8A=A0=E5=B7=A5=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 7 ------- sf_manufacturing/models/sf_technology_design.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index f3de0fb2..74460d4c 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -333,13 +333,6 @@ class MrpProduction(models.Model): technology_design_ids = fields.One2many('sf.technology.design', 'production_id', string='工艺设计') is_adjust = fields.Boolean('是否退回调整', default=False) - def write(self, vals): - res = super(MrpProduction, self).write(vals) - if 'technology_design_ids' in vals: - process_parameters_id = self.technology_design_ids.mapped('process_parameters_id') - self.product_id.model_process_parameters_ids = process_parameters_id.ids - return res - @api.depends('remanufacture_production_id') def _compute_remanufacture_production_ids(self): for production in self: diff --git a/sf_manufacturing/models/sf_technology_design.py b/sf_manufacturing/models/sf_technology_design.py index c3006a94..463ad206 100644 --- a/sf_manufacturing/models/sf_technology_design.py +++ b/sf_manufacturing/models/sf_technology_design.py @@ -36,7 +36,7 @@ class sf_technology_design(models.Model): def write(self, vals): res = super(sf_technology_design, self).write(vals) - if 'active' in vals: + if 'group_uniq_id' in vals or 'process_parameters_id' in vals or 'active' in vals: if self.production_id: process_parameters_id = self.production_id.technology_design_ids.mapped('process_parameters_id') if process_parameters_id.ids: