多面加工工单排程优化
This commit is contained in:
@@ -16,6 +16,8 @@ class Action_Plan_All_Wizard(models.TransientModel):
|
||||
|
||||
# 选择生产线
|
||||
production_line_id = fields.Many2one('sf.production.line', string=u'生产线', required=True)
|
||||
date_planned_start = fields.Datetime(string='计划开始时间', index=True, copy=False,
|
||||
default=fields.Datetime.now)
|
||||
|
||||
# 接收传递过来的计划ID
|
||||
plan_ids = fields.Many2many('sf.production.plan', string=u'计划ID')
|
||||
@@ -33,6 +35,7 @@ class Action_Plan_All_Wizard(models.TransientModel):
|
||||
# 拿到计划对象
|
||||
plan_obj = self.env['sf.production.plan'].browse(plan.id)
|
||||
plan_obj.production_line_id = self.production_line_id.id
|
||||
plan.date_planned_start = self.date_planned_start
|
||||
plan_obj.do_production_schedule()
|
||||
# plan_obj.state = 'done'
|
||||
print('处理计划:', plan.id, '完成')
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<form>
|
||||
<group>
|
||||
<field name="production_line_id" domain="[('name', 'ilike', 'CNC')]"/>
|
||||
<field name="date_planned_start"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="确认排程" name="action_plan_all" type="object" class="btn-primary"/>
|
||||
|
||||
Reference in New Issue
Block a user