mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[MIG] contract_variable_quantity: Migration to 17.0
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
<xpath expr="//field[@name='quantity']" position="after">
|
||||
<field
|
||||
name="qty_formula_id"
|
||||
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
|
||||
required="qty_type == 'variable'"
|
||||
invisible="qty_type != 'variable'"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='quantity']" position="attributes">
|
||||
<attribute name="attrs">{'required': [('qty_type', '=',
|
||||
'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}
|
||||
</attribute>
|
||||
<attribute name="required">"qty_type == 'fixed'"</attribute>
|
||||
<attribute name="invisible">"qty_type != 'fixed'"</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -12,37 +12,27 @@
|
||||
position="before"
|
||||
>
|
||||
<field name="qty_type" />
|
||||
<field
|
||||
name="qty_formula_id"
|
||||
attrs="{'invisible': [('qty_type', '!=', 'variable')]}"
|
||||
/>
|
||||
<field name="qty_formula_id" invisible="qty_type != 'variable'" />
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='contract_line_ids']/tree/field[@name='quantity']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
|
||||
<attribute name="invisible">"qty_type != 'fixed'"</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='contract_line_fixed_ids']/tree/field[@name='quantity']"
|
||||
position="before"
|
||||
>
|
||||
<field name="qty_type" />
|
||||
<field
|
||||
name="qty_formula_id"
|
||||
attrs="{'invisible': [('qty_type', '!=', 'variable')]}"
|
||||
/>
|
||||
<field name="qty_formula_id" invisible="qty_type != 'variable'" />
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='contract_line_fixed_ids']/tree/field[@name='quantity']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
|
||||
</xpath>
|
||||
<attribute name="invisible">qty_type != 'fixed'</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group string="Code">
|
||||
<div style="margin-top: 4px;">
|
||||
<div style="margin-top: 4px;" colspan="2">
|
||||
<field
|
||||
name="code"
|
||||
nolabel="1"
|
||||
|
||||
@@ -11,15 +11,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="quantity" position="before">
|
||||
<field name="qty_type" />
|
||||
<field
|
||||
name="qty_formula_id"
|
||||
attrs="{'invisible': [('qty_type', '!=', 'variable')]}"
|
||||
/>
|
||||
<field name="qty_formula_id" invisible="qty_type != 'variable'" />
|
||||
</field>
|
||||
<field name="quantity" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
|
||||
<attribute name="invisible">"qty_type != 'fixed'"</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
>
|
||||
<field
|
||||
name="qty_formula_id"
|
||||
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
|
||||
required="qty_type == 'variable'"
|
||||
invisible="qty_type != 'variable'"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
|
||||
<attribute name="required">"qty_type == 'fixed'"</attribute>
|
||||
<attribute name="invisible">"qty_type != 'fixed'"</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user