优化agv及新增中控日志调用
This commit is contained in:
@@ -21,6 +21,9 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
||||
[('上产线', '上产线'), ('下产线', '下产线'), ('运送空料架', '运送空料架')], string='类型')
|
||||
|
||||
def confirm(self):
|
||||
if self.type != '运送空料架':
|
||||
if not self.route_id:
|
||||
raise UserError('请选择路线')
|
||||
if self.workorder_id:
|
||||
self.workorder_id.workpiece_delivery_ids[0]._delivery_avg()
|
||||
else:
|
||||
@@ -69,7 +72,8 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
||||
'context': {
|
||||
'default_delivery_ids': [(6, 0, self.delivery_ids.ids)],
|
||||
'default_production_ids': [(6, 0, self.production_ids.ids)],
|
||||
'default_route_id': self.delivery_ids[0].route_id.id
|
||||
'default_route_id': self.delivery_ids[0].route_id.id,
|
||||
'default_type': self.delivery_ids[0].type
|
||||
}}
|
||||
|
||||
@api.onchange('route_id')
|
||||
|
||||
Reference in New Issue
Block a user