优化计划开始时间默认往后延迟10分钟
This commit is contained in:
@@ -6,6 +6,7 @@ from datetime import datetime
|
|||||||
from odoo import fields, models
|
from odoo import fields, models
|
||||||
# from odoo.exceptions import ValidationError
|
# from odoo.exceptions import ValidationError
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ class Action_Plan_All_Wizard(models.TransientModel):
|
|||||||
# 选择生产线
|
# 选择生产线
|
||||||
production_line_id = fields.Many2one('sf.production.line', string=u'生产线', required=True)
|
production_line_id = fields.Many2one('sf.production.line', string=u'生产线', required=True)
|
||||||
date_planned_start = fields.Datetime(string='计划开始时间', index=True, copy=False,
|
date_planned_start = fields.Datetime(string='计划开始时间', index=True, copy=False,
|
||||||
default=fields.Datetime.now)
|
default=datetime.now() + timedelta(minutes=10))
|
||||||
|
|
||||||
# 接收传递过来的计划ID
|
# 接收传递过来的计划ID
|
||||||
plan_ids = fields.Many2many('sf.production.plan', string=u'计划ID')
|
plan_ids = fields.Many2many('sf.production.plan', string=u'计划ID')
|
||||||
|
|||||||
Reference in New Issue
Block a user