<?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 invisible="display_type" />
                <sheet>
                    <field name="specific_price" invisible="1" />
                    <field name="currency_id" invisible="1" />
                    <field colspan="1" name="product_uom_category_id" invisible="1" />
                    <group>
                        <field
                            name="product_id"
                            required="display_type == 'product'"
                            invisible="display_type"
                        />
                    </group>
                    <group invisible="display_type">
                        <group>
                            <field name="automatic_price" />


                            <field name="price_unit" readonly="automatic_price" />
                            <field name="quantity" />
                        </group>
                        <group>
                            <field
                                name="uom_id"
                                groups="uom.group_uom"
                                required="not display_type"
                            />
                            <field
                                name="discount"
                                groups="product.group_discount_per_so_line"
                            />
                            <field name="price_subtotal" readonly="1" />
                        </group>
                    </group>
                    <label for="name" string="Description" invisible="display_type" />
                    <label
                        for="name"
                        string="Section"
                        invisible="display_type != 'line_section'"
                    />
                    <label
                        for="name"
                        string="Note"
                        invisible="display_type != 'line_note'"
                    />
                    <field name="name" nolabel="1" />
                    <group
                        name="note_invoicing_mode"
                        invisible="display_type != 'line_note'"
                    >
                        <field name="note_invoicing_mode" widget="radio" />
                    </group>
                    <group invisible="display_type">
                        <field name="is_auto_renew" />
                        <field name="is_canceled" invisible="1" />
                    </group>
                    <group invisible="not is_auto_renew or display_type">
                        <group>
                            <label for="auto_renew_interval" />
                            <div class="o_row">
                                <field
                                    name="auto_renew_interval"
                                    class="oe_inline"
                                    required="is_auto_renew"
                                />
                                <field
                                    name="auto_renew_rule_type"
                                    class="oe_inline"
                                    required="is_auto_renew"
                                />
                            </div>
                        </group>
                        <group>
                            <label for="termination_notice_interval" />
                            <div class="o_row">
                                <field
                                    name="termination_notice_interval"
                                    class="oe_inline"
                                    required="is_auto_renew"
                                />
                                <field
                                    name="termination_notice_rule_type"
                                    class="oe_inline"
                                    required="is_auto_renew"
                                />
                            </div>
                        </group>
                    </group>
                    <group
                        name="recurrence_info"
                        invisible="display_type == 'line_section' or (display_type == 'line_note' and 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>
