合并
This commit is contained in:
@@ -228,14 +228,8 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
tray = self.env['sf.tray'].search([("production_id", "=", self.production_id.id)])
|
tray = self.env['sf.tray'].search([("production_id", "=", self.production_id.id)])
|
||||||
if tray:
|
if tray:
|
||||||
tray.unclamp()
|
tray.unclamp()
|
||||||
return {
|
self.tray_id = tray
|
||||||
'name': _("工单"),
|
|
||||||
'view_mode': 'form',
|
|
||||||
'res_model': 'mrp.workorder',
|
|
||||||
'res_id': self.id,
|
|
||||||
'type': 'ir.actions.act_window',
|
|
||||||
'target': 'new'
|
|
||||||
}
|
|
||||||
|
|
||||||
# return {
|
# return {
|
||||||
# 'name': _('New Maintenance Request'),
|
# 'name': _('New Maintenance Request'),
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
</field>
|
</field>
|
||||||
<field name="name" position="after">
|
<field name="name" position="after">
|
||||||
<field name="processing_panel"/>
|
<field name="processing_panel"/>
|
||||||
|
</field>
|
||||||
|
<field name="state" position="after">
|
||||||
|
<field name="work_state"/>
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//button[@name='button_start']" position="attributes">
|
<xpath expr="//button[@name='button_start']" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': ['|', '|', '|','|', ('production_state','in', ('draft', 'done',
|
<attribute name="attrs">{'invisible': ['|', '|', '|','|', ('production_state','in', ('draft', 'done',
|
||||||
@@ -286,7 +289,7 @@
|
|||||||
|
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<div class="col-12 col-lg-6 o_setting_box">
|
||||||
<button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"
|
<button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"
|
||||||
attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>
|
attrs='{"invisible": ["|","|",("tray_id","!=",False),("state","!=","progress"),("user_permissions","=",False)]}'/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<div class="col-12 col-lg-6 o_setting_box">
|
||||||
<button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"
|
<button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"
|
||||||
|
|||||||
Reference in New Issue
Block a user