Files
contract/product_contract/views/product_template.xml
Stéphane Bidoul (ACSONE) c3deba13bd [IMP] contract: support pre-paid for monthlylastday
monthlylastday is (almost) not a special case anymore \o/.
montlylastday is simply a montly period where the
periods are aligned on month boundaries.
The last bit of special casing is that postpaid generates
invoice the day after the last dasy of the period, except
for monthlylastday where the invoice is generated on the
last day of the period. This last exception will disappear
when we put the offset under user control.

This is a breaking change because the post-paid/pre-paid
mode becomes relevant for monthlylastday invoicing.
The field becomes visible in the UI. Code that generate
monthlylastday contract lines must now correctly set
the pre-paid/post-paid mode too. Some tests have had
to be adapted to reflect that.
2023-11-09 15:05:40 +01:00

57 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
Copyright 2018 ACSONE SA/NV.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="product_template_form_contract_view" model="ir.ui.view">
<field name="name">account.invoice.select.contract</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='options']" position="inside">
<div attrs="{'invisible': [('type', '!=', 'service')],}">
<field name="is_contract"/>
<label for="is_contract"/>
</div>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="Contract"
name="contract"
attrs="{'invisible': [('is_contract', '=', False)],}">
<group>
<field name="contract_template_id"
attrs="{'required':[('is_contract', '=', True)]}"/>
</group>
<group name="recurrence_info">
<group>
<field name="recurring_rule_type"/>
</group>
<group>
<field name="default_qty"/>
<field name="recurring_invoicing_type"/>
</group>
</group>
<group>
<field name="is_auto_renew"/>
<label for="termination_notice_interval" attrs="{'invisible': [('is_auto_renew', '=', False)],
'required':[('is_contract', '=', True)]}"/>
<div attrs="{'invisible': [('is_auto_renew', '=', False)],
'required':[('is_auto_renew', '=', True)]}">
<field name="termination_notice_interval"
class="oe_inline" nolabel="1"/>
<field name="termination_notice_rule_type"
class="oe_inline" nolabel="1"/>
</div>
</group>
</page>
</xpath>
</field>
</record>
</odoo>