确认工艺路线新增表面工艺参数需要同步到产品的加工参数中

This commit is contained in:
guanhuan
2025-06-16 13:44:55 +08:00
parent fa03b562a2
commit 2febc369bb
2 changed files with 1 additions and 8 deletions

View File

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

View File

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