32 lines
1.7 KiB
XML
32 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Inherit from quality_mrp view -->
|
|
<record id="view_mrp_production_form_inherit_access_restriction" model="ir.ui.view">
|
|
<field name="name">mrp.production.view.form.inherit.access.restriction</field>
|
|
<field name="model">mrp.production</field>
|
|
<field name="inherit_id" ref="quality_mrp.mrp_production_view_form_inherit_quality"/>
|
|
<field name="arch" type="xml">
|
|
<field name="state" position="before">
|
|
<field name="restrict_quality_check_button" invisible="1"/>
|
|
</field>
|
|
|
|
<!-- Header Button -->
|
|
<xpath expr="//button[@name='check_quality']" position="attributes">
|
|
<attribute name="invisible">not quality_check_todo or restrict_quality_check_button</attribute>
|
|
</xpath>
|
|
|
|
<!-- Smart Buttons -->
|
|
<xpath expr="//button[@name='%(quality_mrp.quality_check_action_mo)d'][1]" position="attributes">
|
|
<attribute name="invisible">not check_ids or quality_check_fail or not quality_check_todo or restrict_quality_check_button</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='%(quality_mrp.quality_check_action_mo)d'][2]" position="attributes">
|
|
<attribute name="invisible">not check_ids or quality_check_fail or quality_check_todo or restrict_quality_check_button</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='%(quality_mrp.quality_check_action_mo)d'][3]" position="attributes">
|
|
<attribute name="invisible">not check_ids or not quality_check_fail or restrict_quality_check_button</attribute>
|
|
</xpath>
|
|
|
|
</field>
|
|
</record>
|
|
</odoo>
|