From c0b759aa9d88b3a14a35ff649b26c9102f4d2d0b Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Wed, 8 Nov 2023 11:24:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_plan/models/custom_plan.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py index 9c94fa22..858b1036 100644 --- a/sf_plan/models/custom_plan.py +++ b/sf_plan/models/custom_plan.py @@ -102,12 +102,6 @@ class sf_production_plan(models.Model): self.date_planned_finished = None self.state = 'draft' - # @api.model - # def create(self, vals): - # if 'sequence' not in vals: - # vals['sequence'] = self.env['sf.production.plan'].search_count([]) + 1 - # return super().create(vals) - def unlink(self): sequence_to_reorder = self.mapped('sequence') res = super().unlink() @@ -169,6 +163,9 @@ class sf_production_plan(models.Model): # 当不设置计划结束时间时,增加计算计划结束时间的方法,根据采购周期加缓冲期两个值来算就可以了 def do_production_schedule(self): + """ + 排程方法 + """ if not self.production_line_id: raise ValidationError("未选择生产线") else: