* Update module version to 18.0.1.0.0 * Remove view modifications as they are handled by parent modules * Add comprehensive test suite (34 tests): - Test triple discount mixin write() method behavior - Test account.move.line with triple discounts - Test purchase.order.line with triple discounts * Add oca_dependencies.txt with required OCA repositories * Fix write() method to handle explicit discounts correctly
23 lines
877 B
XML
23 lines
877 B
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
|
|
<!-- Make discount field readonly in invoice lines form view -->
|
|
<record id="invoice_triple_discount_readonly" model="ir.ui.view">
|
|
<field name="name">account.invoice.triple.discount.readonly</field>
|
|
<field name="model">account.move</field>
|
|
<field
|
|
name="inherit_id"
|
|
ref="account_invoice_triple_discount.invoice_triple_discount_form_view"
|
|
/>
|
|
<field name="arch" type="xml">
|
|
<!-- Make the total discount field readonly in form view to force users to use discount1/2/3 -->
|
|
<xpath
|
|
expr="//field[@name='invoice_line_ids']//form//field[@name='discount']"
|
|
position="attributes"
|
|
>
|
|
<attribute name="readonly">1</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|