agv调度开发
This commit is contained in:
@@ -1268,7 +1268,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
def button_delivery(self):
|
||||
production_ids = []
|
||||
workorder_ids = []
|
||||
production_type = '运送空料架'
|
||||
delivery_type = '运送空料架'
|
||||
max_num = 4 # 最大配送数量
|
||||
if len(self) > max_num:
|
||||
raise UserError('仅限于拆卸1-4个制造订单,请重新选择')
|
||||
@@ -1287,7 +1287,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
'context': {
|
||||
# 'default_delivery_ids': [(6, 0, delivery_ids)],
|
||||
'default_production_ids': [(6, 0, production_ids)],
|
||||
'default_type': production_type,
|
||||
'default_delivery_type': delivery_type,
|
||||
'default_workorder_ids': [(6, 0, workorder_ids)],
|
||||
'default_workcenter_id': self.env.context.get('default_workcenter_id'),
|
||||
'default_confirm_button': '确认拆卸'
|
||||
@@ -1588,7 +1588,7 @@ class WorkPieceDelivery(models.Model):
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
if vals['route_id'] and vals.get('type') is None:
|
||||
if vals.get('route_id') and vals.get('type') is None:
|
||||
vals['type'] = '运送空料架'
|
||||
else:
|
||||
if vals.get('name', '/') == '/' or vals.get('name', '/') is False:
|
||||
@@ -1640,7 +1640,7 @@ class WorkPieceDelivery(models.Model):
|
||||
is_cnc_down = 0
|
||||
is_not_production_line = 0
|
||||
same_production_line_id = None
|
||||
production_type = '上产线'
|
||||
delivery_type = '上产线'
|
||||
max_num = 4 # 最大配送数量
|
||||
if len(self) > max_num:
|
||||
raise UserError('仅限于配送1-4个制造订单,请重新选择')
|
||||
@@ -1670,7 +1670,7 @@ class WorkPieceDelivery(models.Model):
|
||||
'context': {
|
||||
# 'default_delivery_ids': [(6, 0, delivery_ids)],
|
||||
'default_production_ids': [(6, 0, production_ids)],
|
||||
'default_type': production_type,
|
||||
'default_delivery_type': delivery_type,
|
||||
'default_workorder_ids': [(6, 0, workorder_ids)],
|
||||
'default_confirm_button': '确认配送'
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user