<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Tecnativa - Sergio Teruel
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="product_template_only_form_view" model="ir.ui.view">
        <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_only_form_view" />
        <field name="arch" type="xml">
            <field name='default_code' position="after">
                <field name="is_elaboration" invisible="type != 'service'" />
            </field>
        </field>
    </record>

    <record id="product_template_form_view" model="ir.ui.view">
        <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_form_view" />
        <field name="arch" type="xml">
            <xpath expr="//group[@name='description']/.." position="after">
                <group name="elboration" string="Elaborations">
                    <field
                        name="elaboration_profile_id"
                        invisible="product_variant_count > 1 and not is_product_variant"
                    />
                </group>
            </xpath>
        </field>
    </record>
</odoo>
