Configure products with create_variants = 'never' from the POS closes odoo/odoo#54956 Taskid: 208205 Related: odoo/upgrade#1522 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
155 lines
7.2 KiB
XML
155 lines
7.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="attribute_tree_view" model="ir.ui.view">
|
|
<field name="name">product.attribute.tree</field>
|
|
<field name="model">product.attribute</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Variant Values">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="display_type"/>
|
|
<field name="create_variant"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_attribute_view_form" model="ir.ui.view">
|
|
<field name="name">product.attribute.form</field>
|
|
<field name="model">product.attribute</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product Attribute">
|
|
<field name="is_used_on_products" invisible="1"/>
|
|
<sheet>
|
|
<group name="main_fields" class="o_label_nowrap">
|
|
<label for="name" string="Attribute Name"/>
|
|
<field name="name" nolabel="1"/>
|
|
<field name="display_type" widget="radio"/>
|
|
<field name="create_variant" widget="radio" attrs="{'readonly': [('is_used_on_products', '=', True)]}"/>
|
|
</group>
|
|
<notebook>
|
|
<page string="Attribute Values" name="attribute_values">
|
|
<field name="value_ids" widget="one2many" nolabel="1">
|
|
<tree string="Values" editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="display_type" invisible="1"/>
|
|
<field name="is_custom" groups="product.group_product_variant"/>
|
|
<field name="html_color" attrs="{'column_invisible': [('parent.display_type', '!=', 'color')]}" widget="color"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Related Products" name="related_products" attrs="{'invisible': [('is_used_on_products', '=', False)]}">
|
|
<field name="product_tmpl_ids">
|
|
<tree>
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="attribute_action" model="ir.actions.act_window">
|
|
<field name="name">Attributes</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">product.attribute</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<record id="product_template_attribute_line_form" model="ir.ui.view">
|
|
<field name="name">product.template.attribute.line.form</field>
|
|
<field name="model">product.template.attribute.line</field>
|
|
<field name="mode">primary</field>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Product Attribute and Values">
|
|
<group name="main_field">
|
|
<label for="attribute_id" string="Attribute Name"/>
|
|
<field name="attribute_id" nolabel="1"/>
|
|
<field name="value_ids" widget="one2many">
|
|
<tree string="Values">
|
|
<field name="name"/>
|
|
<field name="html_color"/>
|
|
</tree>
|
|
<form string="Values">
|
|
<field name="name"/>
|
|
</form>
|
|
</field>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_attribute_value_view_tree" model="ir.ui.view">
|
|
<field name="name">product.template.attribute.value.view.tree</field>
|
|
<field name="model">product.template.attribute.value</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Attributes" create="0" delete="0">
|
|
<field name="attribute_id"/>
|
|
<field name="name"/>
|
|
<field name="display_type"/>
|
|
<field name="html_color" attrs="{'invisible': [('display_type', '!=', 'color')]}" widget="color"/>
|
|
<field name="ptav_active" optional="hide"/>
|
|
<field name="price_extra" widget="monetary"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_attribute_value_view_form" model="ir.ui.view">
|
|
<field name="name">product.template.attribute.value.view.form.</field>
|
|
<field name="model">product.template.attribute.value</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product Attribute" create="0" delete="0">
|
|
<sheet>
|
|
<group>
|
|
<field name="ptav_active" readonly="1" attrs="{'invisible': [('ptav_active', '=', True)]}"/>
|
|
<field name="name"/>
|
|
<field name="display_type" invisible="1"/>
|
|
<field name="html_color" attrs="{'invisible': [('display_type', '!=', 'color')]}"/>
|
|
<field name="price_extra" widget="monetary"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="exclude_for" widget="one2many" mode="tree">
|
|
<tree editable="bottom">
|
|
<field name="product_tmpl_id" />
|
|
<field name="value_ids" widget="many2many_tags" options="{'no_create': True}" />
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_attribute_value_view_search" model="ir.ui.view">
|
|
<field name="model">product.template.attribute.value</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<filter string="Active" name="active" domain="[('ptav_active', '=', True)]"/>
|
|
<filter string="Inactive" name="inactive" domain="[('ptav_active', '=', False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_attribute_value_action" model="ir.actions.act_window">
|
|
<field name="name">Product Variant Values</field>
|
|
<field name="res_model">product.template.attribute.value</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('product_tmpl_id', '=', active_id)]</field>
|
|
<field name="view_ids"
|
|
eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'tree', 'view_id': ref('product.product_template_attribute_value_view_tree')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('product.product_template_attribute_value_view_form')})]" />
|
|
<field name="context">{
|
|
'default_product_tmpl_id': active_id,
|
|
'search_default_active': 1,
|
|
}</field>
|
|
</record>
|
|
|
|
</odoo>
|