From 7fb3c32d079b599eefb5263bade94dbde0355a8c Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Mon, 1 Jul 2024 17:48:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/controllers/controllers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 3b2a8682..805a1a8f 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -232,7 +232,7 @@ class Manufacturing_Connect(http.Controller): production_obj = request.env['mrp.production'].sudo().search([('name', '=', production_id)]) if production_obj: production_obj.sudo().work_order_state = '已完成' - production_obj.write({'state': 'completed'}) + production_obj.write({'state': 'done'}) # request.env['sale.order'].sudo().search( # [('name', '=', production_obj.origin)]).write({'schedule_status': 'to deliver'}) From 6b6be85057bc09d4f3804b193ca9a35df6c3c855 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Mon, 1 Jul 2024 18:12:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95=E7=9A=84=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=AD=89=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/controllers/controllers.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 805a1a8f..dd97531f 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -225,14 +225,14 @@ class Manufacturing_Connect(http.Controller): # workorder.sudo().production_id.process_state = '待解除装夹' # 根据工单的实际结束时间修改排程单的结束时间、状态,同时修改销售订单的状态 - if workorder.date_finished: - request.env['sf.production.plan'].sudo().search([('production_id', '=', production_id)]).write( - {'actual_end_time': workorder.date_finished, - 'state': 'finished'}) - production_obj = request.env['mrp.production'].sudo().search([('name', '=', production_id)]) - if production_obj: - production_obj.sudo().work_order_state = '已完成' - production_obj.write({'state': 'done'}) + # if workorder.date_finished: + # request.env['sf.production.plan'].sudo().search([('production_id', '=', production_id)]).write( + # {'actual_end_time': workorder.date_finished, + # 'state': 'finished'}) + # production_obj = request.env['mrp.production'].sudo().search([('name', '=', production_id)]) + # if production_obj: + # production_obj.sudo().work_order_state = '已完成' + # production_obj.write({'state': 'done'}) # request.env['sale.order'].sudo().search( # [('name', '=', production_obj.origin)]).write({'schedule_status': 'to deliver'}) From e9c9b77112cc3d31cb70c7bf904c178c3fc382dd Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Mon, 1 Jul 2024 18:27:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=AE=8C=E6=88=90=E6=8A=A5=E5=BA=93=E5=AD=98?= =?UTF-8?q?=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_workorder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index a11404bf..0375b48e 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1015,7 +1015,7 @@ class ResMrpWorkOrder(models.Model): move_raw_id.quantity_done = move_raw_id.product_uom_qty record.process_state = '已完工' record.production_id.process_state = '已完工' - if record.routing_type in ['表面工艺']: + if record.routing_type in ['解除装夹', '表面工艺']: raw_move = self.env['stock.move'].sudo().search( [('origin', '=', record.production_id.name), ('procure_method', '=', 'make_to_order'), ('state', '!=', 'done')])