工单优化

This commit is contained in:
yuxianghui
2025-01-20 14:47:09 +08:00
parent 8e788d3745
commit 955b6a6213

View File

@@ -1549,8 +1549,8 @@ class ResMrpWorkOrder(models.Model):
@api.onchange('state') @api.onchange('state')
def _onchange_state_quality(self): def _onchange_state_quality(self):
for wm in self: for wm in self:
if wm.routing_type == 'CNC加工' and wm.state == 'to be detected' and wm.check_ids: if wm.routing_type == 'CNC加工' and wm.state == 'to be detected':
wm.check_ids.filtered(lambda ch: ch.is_inspect is True and ch.quality_state == 'waiting').write( wm.check_ids.filtered(lambda ch: ch.quality_state == 'waiting').write(
{'quality_state': 'none'}) {'quality_state': 'none'})