From 78fff46452bbdc25dc414b2f6e7506e45a5e5cb2 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Wed, 25 Dec 2024 14:16:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=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_production.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 211054a7..ed117589 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -364,9 +364,8 @@ class MrpProduction(models.Model): # if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')): # production.state = 'done' if any((wo.test_results == '返工' and wo.state == 'done' and production.programming_state in ['已编程']) - or (wo.state == 'rework' and production.programming_state == '编程中') or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程']) - for wo in production.workorder_ids) and production.state not in ['progress']: + for wo in production.workorder_ids): production.state = 'rework' if any(wo.test_results == '报废' and wo.state == 'done' for wo in production.workorder_ids): production.state = 'scrap'