You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

63 lines
2.9 KiB

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 ACSONE SA/NV.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.form (in product_contract)</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']" position="before">
<field name="is_contract" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/form//field[@name='tax_id']/parent::group"
position="after">
<separator colspan="4" string="Recurrence Invoicing"
attrs="{'invisible': [('is_contract', '=', False)]}"/>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="is_contract" invisible="1"/>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('is_contract', '=', False)],
'required':[('is_contract', '=', True)]}"/>
</group>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<label for="recurring_interval"/>
<div>
<field name="recurring_interval"
class="oe_inline" nolabel="1"
attrs="{'required':[('is_contract', '=', True)]}"/>
<field name="recurring_rule_type"
class="oe_inline" nolabel="1"
attrs="{'required':[('is_contract', '=', True)]}"/>
</div>
</group>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="date_start"/>
<field name="recurring_next_date"/>
</group>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="date_end"/>
</group>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='price_total']"
position="after">
<field name="date_start"
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
<field name="date_end"
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
<field name="recurring_next_date"
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree"
position="attributes">
<attribute name="editable"/>
</xpath>
</field>
</record>
</odoo>