From 56d8190fc6ae9197038f8402987768e37af957ef Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 2 Jan 2024 11:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=9A=E5=8A=A1=E9=80=BB?= =?UTF-8?q?=E8=BE=91:=E5=BD=93=E4=B8=BB=E5=88=B6=E9=80=A0=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=8E=92=E7=A8=8B=E5=90=8E=EF=BC=8C=E5=AD=90bom?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=94=B9=E7=8A=B6=E6=80=81=E4=B8=BA=E5=B7=B2?= =?UTF-8?q?=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_plan/models/custom_plan.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py index 075c7e21..ddc7ed1c 100644 --- a/sf_plan/models/custom_plan.py +++ b/sf_plan/models/custom_plan.py @@ -173,6 +173,10 @@ class sf_production_plan(models.Model): item.date_planned_start, item.date_planned_finished self.state = 'done' self.production_id.schedule_state = '已排' + mrp_production_ids = self.production_id._get_children().ids + print('mrp_production_ids', mrp_production_ids) + for i in mrp_production_ids: + self.env['mrp.production'].browse(i).schedule_state = '已排' # self.production_id.date_planned_start = self.date_planned_start # self.production_id.date_planned_finished = self.date_planned_finished else: