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: