From c5bb9a32d0f1bc992b48cc1cfb1f3a0c9563d60e Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 28 Aug 2024 14:50:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E9=9D=A2=E5=B7=A5=E8=89=BA=E6=8E=92?= =?UTF-8?q?=E7=A8=8B=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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index c67fd105..efa84c52 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -770,9 +770,13 @@ class MrpProduction(models.Model): 'date_from': date_planned_start, 'date_to': date_planned_end, }) + # work.write({'date_planned_start': date_planned_start, 'date_planned_finished': date_planned_end}) work.date_planned_start = date_planned_start work.date_planned_finished = date_planned_end - # work.write({'date_planned_start': date_planned_start, 'date_planned_finished': date_planned_end}) + routing_workcenter = self.env['mrp.routing.workcenter'].sudo().search( + [('name', '=', work.routing_type)]) + + work.write({'date_planned_start': date_planned_start, 'date_planned_finished': date_planned_end,'duration_expected':routing_workcenter.time_cycle}) # 修改标记已完成方法 def button_mark_done1(self):