<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="contract_customer_form_sale" model="ir.ui.view">
        <field name="name">partner.contract.customer.form.sale</field>
        <field name="model">partner.contract.customer</field>
        <field name="inherit_id" ref="l10n_ru_contract.contract_customer_form"/>
        <field name="arch" type="xml">
            <xpath expr="//notebook" position="inside">
                <page string="Продажи" name="sales">
                    <group>
                        <group>
                            <field name="sale_order_id" readonly="state!='draft'"/>
                        </group>
                        <group>
                            <field name="manager_id"/>
                            <field name="team_id"/>
                        </group>
                    </group>
                </page>
            </xpath>
        </field>
    </record>

    <record id="contract_customer_action2" model="ir.actions.act_window">
        <field name="name">Договоры</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">partner.contract.customer</field>
        <field name="view_mode">kanban,list,form</field>
        <field name="domain">[('type', '=', 'customer')]</field>
        <field name="help" type="html">

            <p class="oe_view_nocontent_create">
                Нет созданных контрактов
            </p>
            <p>
            </p>
        </field>
    </record>

    <menuitem name="Договоры" id="l10n_ru_contract.main" parent="sale.sale_menu_root"/>
    <menuitem name="Договоры" id="l10n_ru_contract.contracts" parent="l10n_ru_contract.main"
              action="l10n_ru_contract_sale.contract_customer_action2"/>

    <menuitem name="Настройка" id="l10n_ru_contract.separator" parent="l10n_ru_contract.main"/>
    <menuitem name="Виды договоров" id="l10n_ru_contract.contract_profiles" parent="l10n_ru_contract.separator"
              action="l10n_ru_contract.contract_profile_action"/>
    <menuitem name="Включенные договора" id="l10n_ru_contract.contract_profile_setting" parent="l10n_ru_contract.separator"
              action="l10n_ru_contract.contract_allowed_profiles_action"/>
</odoo>
