Browse Source

[10.0][IMP] Add variable qty to contract template view (#66)

* [IMP] Add variable qty to contract template view

* Bump minor version
pull/139/head
Dave Lasley 8 years ago
committed by Carlos Dauden
parent
commit
dd17919e35
  1. 2
      contract_variable_quantity/__manifest__.py
  2. 19
      contract_variable_quantity/views/contract_view.xml

2
contract_variable_quantity/__manifest__.py

@ -4,7 +4,7 @@
{ {
'name': 'Variable quantity in contract recurrent invoicing', 'name': 'Variable quantity in contract recurrent invoicing',
'version': '10.0.1.0.0',
'version': '10.0.1.1.0',
'category': 'Contract Management', 'category': 'Contract Management',
'license': 'AGPL-3', 'license': 'AGPL-3',
'author': "Tecnativa," 'author': "Tecnativa,"

19
contract_variable_quantity/views/contract_view.xml

@ -1,6 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record id="account_analytic_contract_view_form" model="ir.ui.view">
<field name="name">Contract Template Variable Qty</field>
<field name="model">account.analytic.contract</field>
<field name="inherit_id" ref="contract.account_analytic_contract_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='recurring_invoice_line_ids']//field[@name='quantity']" position="before">
<field name="qty_type"/>
</xpath>
<xpath expr="//field[@name='recurring_invoice_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='recurring_invoice_line_ids']//field[@name='quantity']" position="attributes">
<attribute name="attrs">{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
</xpath>
</field>
</record>
<record id="account_analytic_account_recurring_form_form" model="ir.ui.view"> <record id="account_analytic_account_recurring_form_form" model="ir.ui.view">
<field name="model">account.analytic.account</field> <field name="model">account.analytic.account</field>
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/> <field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/>

Loading…
Cancel
Save