取消配送路线关联字段修改
This commit is contained in:
@@ -20,7 +20,9 @@ class AgvScheduling(models.Model):
|
|||||||
|
|
||||||
name = fields.Char('任务单号', index=True, copy=False)
|
name = fields.Char('任务单号', index=True, copy=False)
|
||||||
agv_route_id = fields.Many2one('sf.agv.task.route', '任务路线')
|
agv_route_id = fields.Many2one('sf.agv.task.route', '任务路线')
|
||||||
agv_route_type = fields.Selection(related='agv_route_id.route_type', string='任务类型', required=True)
|
def _get_agv_route_type_selection(self):
|
||||||
|
return self.env['sf.agv.task.route'].fields_get(['route_type'])['route_type']['selection']
|
||||||
|
agv_route_type = fields.Selection(selection=_get_agv_route_type_selection, string='任务类型', required=True)
|
||||||
start_site_id = fields.Many2one('sf.agv.site', '起点接驳站', required=True)
|
start_site_id = fields.Many2one('sf.agv.site', '起点接驳站', required=True)
|
||||||
end_site_id = fields.Many2one('sf.agv.site', '终点接驳站', tracking=True)
|
end_site_id = fields.Many2one('sf.agv.site', '终点接驳站', tracking=True)
|
||||||
site_state = fields.Selection([
|
site_state = fields.Selection([
|
||||||
|
|||||||
@@ -1859,7 +1859,10 @@ class WorkPieceDelivery(models.Model):
|
|||||||
feeder_station_destination_id = fields.Many2one('sf.agv.site', '目的接驳站')
|
feeder_station_destination_id = fields.Many2one('sf.agv.site', '目的接驳站')
|
||||||
task_delivery_time = fields.Datetime('任务下发时间')
|
task_delivery_time = fields.Datetime('任务下发时间')
|
||||||
task_completion_time = fields.Datetime('任务完成时间')
|
task_completion_time = fields.Datetime('任务完成时间')
|
||||||
type = fields.Selection(related='route_id.route_type', string='类型')
|
|
||||||
|
def _get_agv_route_type_selection(self):
|
||||||
|
return self.env['sf.agv.task.route'].fields_get(['route_type'])['route_type']['selection']
|
||||||
|
type = fields.Selection(selection=_get_agv_route_type_selection, string='类型')
|
||||||
delivery_duration = fields.Float('配送时长', compute='_compute_delivery_duration')
|
delivery_duration = fields.Float('配送时长', compute='_compute_delivery_duration')
|
||||||
status = fields.Selection(
|
status = fields.Selection(
|
||||||
[('待下发', '待下发'), ('已下发', '待配送'), ('已配送', '已配送'), ('已取消', '已取消')], string='状态',
|
[('待下发', '待下发'), ('已下发', '待配送'), ('已配送', '已配送'), ('已取消', '已取消')], string='状态',
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delivery_type = fields.Selection(related='route_id.route_type', string='类型')
|
def _get_agv_route_type_selection(self):
|
||||||
|
return self.env['sf.agv.task.route'].fields_get(['route_type'])['route_type']['selection']
|
||||||
|
delivery_type = fields.Selection(selection=_get_agv_route_type_selection, string='类型')
|
||||||
|
|
||||||
def dispatch_confirm(self):
|
def dispatch_confirm(self):
|
||||||
if len(self.workorder_ids) < 4:
|
if len(self.workorder_ids) < 4:
|
||||||
|
|||||||
Reference in New Issue
Block a user