[IMP] contract_variable_quantity: black, isort, prettier

This commit is contained in:
Carlos Roca
2020-10-27 13:35:26 +01:00
committed by Juanjo
parent 5b9eeb166e
commit 3cb0d88dec
12 changed files with 190 additions and 166 deletions

View File

@@ -1,23 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="contract_template_form_view" model="ir.ui.view">
<field name="name">Contract Template Variable Qty</field>
<field name="model">contract.template</field>
<field name="inherit_id" ref="contract.contract_template_form_view"/>
<field name="inherit_id" ref="contract.contract_template_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='contract_line_ids']//field[@name='quantity']" position="before">
<field name="qty_type"/>
<xpath
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
position="before"
>
<field name="qty_type" />
</xpath>
<xpath expr="//field[@name='contract_line_ids']//field[@name='quantity']" position="after">
<field name="qty_formula_id"
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
<xpath
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
position="after"
>
<field
name="qty_formula_id"
attrs="{'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>
<xpath
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
position="attributes"
>
<attribute
name="attrs"
>{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
</xpath>
</field>
</record>
</odoo>