优化agv及新增中控日志调用
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<field name="delivery_ids" invisible="True"/>
|
||||
<field name="workorder_id" invisible="True"/>
|
||||
<field name="type" invisible="True"/>
|
||||
<group>
|
||||
<group attrs="{'invisible': [('type', 'in', ['运送空料架'])]}">
|
||||
<field name="production_ids" readonly="1" widget="many2many_tags" string="制造订单号"/>
|
||||
<div class="o_address_format">
|
||||
<lable for="rfid_code"></lable>
|
||||
@@ -17,9 +17,9 @@
|
||||
<button name="recognize_production" string="识别" type="object" class="oe_highlight"/>
|
||||
</div>
|
||||
<field name="destination_production_line_id" readonly="1"/>
|
||||
<field name="route_id" required="1"/>
|
||||
<field name="route_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<group attrs="{'invisible': [('type', 'in', ['运送空料架'])]}">
|
||||
<field name="feeder_station_start_id" focesave="1" readonly="1"/>
|
||||
<field name="feeder_station_destination_id" focesave="1" readonly="1"/>
|
||||
</group>
|
||||
|
||||
@@ -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