From 955b6a6213c31c8f38dca3bdac14ebe9f4ffd120 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Mon, 20 Jan 2025 14:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'})