Browse Source

[12.0][IMP] - Use sale.group_discount_per_so_line on discount field

pull/203/head
sbejaoui 6 years ago
parent
commit
9e89c533bd
  1. 1
      contract_sale/__manifest__.py
  2. 16
      contract_sale/views/account_analytic_account_view.xml
  3. 21
      contract_sale/views/account_analytic_contract_view.xml

1
contract_sale/__manifest__.py

@ -16,6 +16,7 @@
'security/ir.model.access.csv',
'security/account_analytic_account_security.xml',
'views/account_analytic_account_view.xml',
'views/account_analytic_contract_view.xml',
],
'license': 'AGPL-3',
'installable': True,

16
contract_sale/views/account_analytic_account_view.xml

@ -1,6 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_account_recurring_form_form"
model="ir.ui.view">
<field name="name">Contract form (in contract_sale)</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id"
ref="contract.account_analytic_account_recurring_form_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='discount']" position="attributes">
<attribute name="groups">sale.group_discount_per_so_line
</attribute>
</xpath>
</field>
</record>
<menuitem
id="menu_contract_sale" name="Contracts"
parent="sale.sale_order_menu"

21
contract_sale/views/account_analytic_contract_view.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_contract_view_form" model="ir.ui.view">
<field name="name">Account Analytic Contract Form View (in
sale_contract)
</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='discount']" position="attributes">
<attribute name="groups">sale.group_discount_per_so_line
</attribute>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save