diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index b0615197..f9648d43 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1549,8 +1549,8 @@ class ResMrpWorkOrder(models.Model): @api.onchange('state') def _onchange_state_quality(self): for wm in self: - if wm.routing_type == 'CNC加工' and wm.state == 'to be detected' and wm.check_ids: - wm.check_ids.filtered(lambda ch: ch.is_inspect is True and ch.quality_state == 'waiting').write( + if wm.routing_type == 'CNC加工' and wm.state == 'to be detected': + wm.check_ids.filtered(lambda ch: ch.quality_state == 'waiting').write( {'quality_state': 'none'})