From fa03b562a21e2c364c012e8aeb73e39495a0563d Mon Sep 17 00:00:00 2001 From: guanhuan Date: Mon, 16 Jun 2025 11:52:22 +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/sf_technology_design.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/sf_technology_design.py b/sf_manufacturing/models/sf_technology_design.py index 7b79d485..c3006a94 100644 --- a/sf_manufacturing/models/sf_technology_design.py +++ b/sf_manufacturing/models/sf_technology_design.py @@ -39,7 +39,10 @@ class sf_technology_design(models.Model): if 'active' in vals: if self.production_id: process_parameters_id = self.production_id.technology_design_ids.mapped('process_parameters_id') - self.production_id.product_id.model_process_parameters_ids = process_parameters_id.ids + if process_parameters_id.ids: + self.production_id.product_id.model_process_parameters_ids = process_parameters_id.ids + else: + self.production_id.product_id.model_process_parameters_ids = None return res def unlink_technology_design(self):