Browse Source

Merge PR #411 into 12.0

Signed-off-by sbejaoui
pull/402/head
OCA-git-bot 5 years ago
parent
commit
ec7c054b1c
  1. 3
      contract_variable_quantity/__manifest__.py
  2. 24
      contract_variable_quantity/views/contract_line_views.xml

3
contract_variable_quantity/__manifest__.py

@ -1,4 +1,4 @@
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# Copyright 2016-2019 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden # Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2019 ACSONE SA/NV # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@ -16,6 +16,7 @@
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'views/abstract_contract_line.xml', 'views/abstract_contract_line.xml',
'views/contract_line_formula.xml', 'views/contract_line_formula.xml',
'views/contract_line_views.xml',
'views/contract_template.xml', 'views/contract_template.xml',
'views/contract.xml', 'views/contract.xml',
], ],

24
contract_variable_quantity/views/contract_line_views.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="contract_line_tree_view" model="ir.ui.view">
<field name="name">contract.line tree view (in contract) - Add variable qty fields</field>
<field name="model">contract.line</field>
<field name="inherit_id" ref="contract.contract_line_tree_view"/>
<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>
<field name="quantity" position="attributes">
<attribute name="attrs">{'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save