<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2023 Akretion France (http://www.akretion.com/)
  @author: Alexis de Lattre <alexis.delattre@akretion.com>
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo>

<record id="product_template_tree_view" model="ir.ui.view">
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_tree_view"/>
    <field name="arch" type="xml">
        <field name="type" position="after">
            <field name="detailed_type" optional="hide" readonly="1"/>
        </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">
        <field name="type" position="after">
            <field name="detailed_type"/>
        </field>
        <field name="type" position="attributes">
            <attribute name="invisible">1</attribute>
        </field>
    </field>
</record>

<record id="product_template_search_view" model="ir.ui.view">
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_search_view"/>
    <field name="arch" type="xml">
        <filter name="type" position="attributes">
            <attribute name="invisible">1</attribute>
        </filter>
        <filter name="type" position="after">
            <filter name="detailed_type_groupby" string="Product Type" context="{'group_by': 'detailed_type'}"/>
        </filter>
    </field>
</record>


</odoo>
