mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
With these changes, we allow the contract line start date to be computed using the order confirmation date. When the product is configured with any of the options set in contract_start_date_method other than manual, the start date will be calculated based on the established date and the selected period. Additionally, we can force the month in which we will work in case the frequency is yearly, quarterly, or semesterly. Is not added support for daily, weekly or monthlylastday in this commit.
94 lines
4.2 KiB
XML
94 lines
4.2 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 invisible="type != 'service'">
|
|
<field name="is_contract" />
|
|
<label for="is_contract" />
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//notebook" position="inside">
|
|
<page
|
|
string="Contract"
|
|
name="contract"
|
|
invisible="is_contract == False"
|
|
>
|
|
<group>
|
|
<field name="property_contract_template_id" />
|
|
</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" />
|
|
<field name="contract_start_date_method" required="True" />
|
|
<field
|
|
name="force_month_yearly"
|
|
invisible="contract_start_date_method == 'manual' or recurring_rule_type != 'yearly'"
|
|
/>
|
|
<field
|
|
name="force_month_quarterly"
|
|
invisible="contract_start_date_method == 'manual' or recurring_rule_type != 'quarterly'"
|
|
/>
|
|
<field
|
|
name="force_month_semesterly"
|
|
invisible="contract_start_date_method == 'manual' or recurring_rule_type != 'semesterly'"
|
|
/>
|
|
</group>
|
|
<group>
|
|
<group invisible="is_auto_renew == False">
|
|
<label for="auto_renew_interval" />
|
|
<div>
|
|
<field
|
|
name="auto_renew_interval"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
required="is_auto_renew == True"
|
|
/>
|
|
<field
|
|
name="auto_renew_rule_type"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
required="is_auto_renew == True"
|
|
/>
|
|
</div>
|
|
</group>
|
|
<group invisible="is_auto_renew == False">
|
|
<label for="termination_notice_interval" />
|
|
<div>
|
|
<field
|
|
name="termination_notice_interval"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
required="is_auto_renew == True"
|
|
/>
|
|
<field
|
|
name="termination_notice_rule_type"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
required="is_auto_renew == True"
|
|
/>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|