<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!--FORM view-->
    <record id="contract_abstract_contract_line_form_view" model="ir.ui.view">
        <field
            name="name"
        >contract.abstract.contract.line form view (in contract)</field>
        <field name="model">contract.abstract.contract.line</field>
        <field name="arch" type="xml">
            <form>
                <field name="display_type" invisible="1" />
                <header attrs="{'invisible': [('display_type', '!=', False)]}" />
                <sheet>
                    <field name="specific_price" invisible="1" />
                    <field name="company_id" invisible="1" />
                    <field name="currency_id" invisible="1" />
                    <field colspan="1" name="product_uom_category_id" invisible="1" />
                    <group>
                        <field
                            name="product_id"
                            attrs="{'required': [('display_type', '=', 'product')],'invisible': [('display_type', '!=', False)]}"
                        />
                    </group>
                    <group attrs="{'invisible': [('display_type', '!=', False)]}">
                        <group>
                            <field name="automatic_price" />
                            <field
                                name="price_unit"
                                attrs="{'readonly': [('automatic_price', '=', True)]}"
                            />
                            <field name="quantity" />
                        </group>
                        <group>
                            <field
                                name="uom_id"
                                groups="uom.group_uom"
                                attrs="{'required': [('display_type', '=', False)]}"
                            />
                            <field
                                name="discount"
                                groups="product.group_discount_per_so_line"
                            />
                            <field name="price_subtotal" readonly="1" />
                        </group>
                    </group>
                    <label
                        for="name"
                        string="Description"
                        attrs="{'invisible': [('display_type', '!=', False)]}"
                    />
                    <label
                        for="name"
                        string="Section"
                        attrs="{'invisible': [('display_type', '!=', 'line_section')]}"
                    />
                    <label
                        for="name"
                        string="Note"
                        attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
                    />
                    <field name="name" nolabel="1" />
                    <group
                        name="note_invoicing_mode"
                        attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
                    >
                        <field name="note_invoicing_mode" widget="radio" />
                    </group>
                    <group attrs="{'invisible': [('display_type', '!=', False)]}">
                        <field name="is_auto_renew" />
                        <field name="is_canceled" invisible="1" />
                    </group>
                    <group
                        attrs="{'invisible':['|', ('is_auto_renew', '=', False), ('display_type', '!=', False)]}"
                    >
                        <group>
                            <label for="auto_renew_interval" />
                            <div class="o_row">
                                <field
                                    name="auto_renew_interval"
                                    attrs="{'required':[('is_auto_renew', '=', True)]}"
                                />
                                <field
                                    name="auto_renew_rule_type"
                                    attrs="{'required':[('is_auto_renew', '=', True)]}"
                                />
                            </div>
                        </group>
                        <group>
                            <label for="termination_notice_interval" />
                            <div class="o_row">
                                <field
                                    name="termination_notice_interval"
                                    class="oe_inline"
                                    attrs="{'required':[('is_auto_renew', '=', True)]}"
                                />
                                <field
                                    name="termination_notice_rule_type"
                                    class="oe_inline"
                                    attrs="{'required':[('is_auto_renew', '=', True)]}"
                                />
                            </div>
                        </group>
                    </group>
                    <group
                        name="recurrence_info"
                        attrs="{'invisible': ['|', ('display_type', '=', 'line_section'), '&amp;', ('display_type', '=', 'line_note'), ('note_invoicing_mode', '!=', 'custom')]}"
                    >
                        <group>
                            <label for="recurring_interval" />
                            <div class="o_row">
                                <field name="recurring_interval" />
                                <field name="recurring_rule_type" />
                            </div>
                            <field name="recurring_invoicing_type" />
                            <field name="recurring_invoicing_offset" />
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>
</odoo>
