You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.7 KiB
42 lines
1.7 KiB
<?xml version="1.0"?>
|
|
<odoo>
|
|
<record id="view_sale_order_version" model="ir.ui.view">
|
|
<field name="name">view.sale.order.version</field>
|
|
<field name="model">sale.order</field>
|
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//button[@name='action_confirm']" position="after">
|
|
<button name="action_create_versions" states="sent"
|
|
type="object"
|
|
string="Create Version"/>
|
|
</xpath>
|
|
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="action_view_versions"
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-bars"
|
|
attrs="{'invisible': [('version_count', '=', 0)]}">
|
|
<field name="version_count" widget="statinfo"
|
|
string="Versions"/>
|
|
</button>
|
|
</div>
|
|
<xpath expr="//field[@name='validity_date']" position="after">
|
|
<field name="is_version" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_draft']" position='attributes'>
|
|
<attribute name="attrs">
|
|
{'invisible': ['|',('state', 'not in',
|
|
'cancel'),('is_version',
|
|
'=', True)]}
|
|
</attribute>
|
|
<attribute name="states"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!--Domain passed for only viewing the confirmed version-->
|
|
<record id="sale.action_quotations_with_onboarding" model="ir.actions.act_window">
|
|
<field name="domain">[('is_version', '=', False)]</field>
|
|
</record>
|
|
</odoo>
|
|
|