view_product_template.xml 1.42 KB
Newer Older
François C. committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<?xml version="1.0"?>
<!--
    Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
    @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
    License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo>

    <record model="ir.ui.view" id="view_product_template_form">
        <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_form_view"/>
        <field name="arch" type="xml">
            <div name="options" position="inside">
                <div groups="account.group_account_user">
                    <field name="is_capital_fundraising"/>
                    <label for="is_capital_fundraising"/>
                </div>
                <div groups="account.group_account_user">
                    <field name="is_deficit_product"/>
                    <label for="is_deficit_product"/>
                </div>
            </div>
        </field>
    </record>


    <record model="ir.ui.view" id="product_template_form_account_view">
        <field name="model">product.template</field>
        <field name="inherit_id" ref="account.product_template_form_view"/>
        <field name="arch" type="xml">
            <field name="property_account_expense_id" position="after">
                <field name="deficit_share_account_id" attrs="{'invisible': [('is_capital_fundraising', '=', False)]}"/>
            </field>
        </field>
    </record>


</odoo>