<?xml version="1.0"?>
<form string="Product Attribute">
            <field name="number_related_products" invisible="1"/>
            <sheet>
                <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
                <div class="oe_button_box" name="button_box">
                    <button name="action_open_product_template_attribute_lines" type="object" class="oe_stat_button" icon="fa-bars" invisible="not number_related_products">
                        <div class="o_stat_info">
                            <span class="o_stat_value"><field name="number_related_products"/></span>
                            <span class="o_stat_text">Products</span>
                        </div>
                    </button>
                </div>
                <group name="main_fields">
                    <group name="sale_main_fields">
                        <label for="name" string="Attribute Name"/>
                        <field name="name" nolabel="1"/>
                        <field name="display_type" widget="radio" options="{'horizontal': True}"/>
                        <field name="create_variant" widget="radio" options="{'horizontal': True}" readonly="number_related_products != 0 or display_type == 'multi'" force_save="1"/>
                    </group>
                </group>
                <notebook>
                    <page string="Attribute Values" name="attribute_values">
                        <field name="value_ids" widget="pavs_one2many" nolabel="1">
                            <list string="Values" editable="bottom">
                                <field name="sequence" widget="handle"/>
                                <field name="name"/>
                                <field name="display_type" column_invisible="True"/>
                                <field name="is_custom" width="120px" column_invisible="parent.display_type == 'multi'"/>
                                <field name="html_color" widget="color" column_invisible="parent.display_type != 'color'" invisible="image"/>
                                <field name="image" widget="image" options="{'size': [70, 70]}" class="oe_avatar text-start float-none" column_invisible="parent.display_type != 'color'"/>
                                <field name="default_extra_price" width="160px"/>
                                <button name="action_add_to_products" string="Add to products" type="object" icon="fa-plus" column_invisible="parent.number_related_products &lt; 1" invisible="pav_attribute_line_ids"/>
                                <button name="action_update_prices" string="Update extra prices" type="object" icon="fa-refresh" column_invisible="parent.number_related_products &lt; 1" invisible="not pav_attribute_line_ids or not default_extra_price_changed"/>
                            </list>
                        </field>
                    </page>
                </notebook>
            </sheet>
            </form>
        