From 0bcd0779149b889b59a78b6e7e39c8fd1c9bf649 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Wed, 24 Apr 2024 22:53:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=B6=E9=80=A0=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 61461dde..82588ffe 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -78,7 +78,7 @@ class MrpProduction(models.Model): @api.depends( 'move_raw_ids.state', 'move_raw_ids.quantity_done', 'move_finished_ids.state', - 'workorder_ids.state', 'product_qty', 'qty_producing', 'schedule_state') + 'workorder_ids.state', 'product_qty', 'qty_producing', 'schedule_state', 'process_state') def _compute_state(self): for production in self: if not production.state or not production.product_uom_id: @@ -110,15 +110,15 @@ class MrpProduction(models.Model): production.state = 'progress' # 新添加的状态逻辑 - if production.state == 'progress' and production.schedule_state == '已排': + if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待装夹': # production.state = 'pending_processing' production.state = 'pending_cam' if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待加工': # if production.state == 'pending_cam' and production.process_state == '待加工': production.state = 'pending_processing' - elif production.state == 'pending_processing' and production.process_state == '待解除装夹': + elif production.state == 'progress' and production.process_state == '待解除装夹': production.state = 'pending_era_cam' - elif production.state == 'pending_era_cam' and production.process_state == '已完工': + elif production.state == 'progress' and production.process_state == '已完工': production.state = 'completed' elif production.state == 'progress' and production.work_order_state == '已完成': production.state = 'completed'