[IMP] point_of_sale: fix attribute type default value
When you are creating product attributes from the point_of-sale menu item, the default type of attribute is never. Those changes has been done because, there is a new feature that show a product configurator in POS for a product having attributes "never". closes odoo/odoo#68444 Task-id: 2342501 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form,activity</field>
|
||||
<field name="context" eval="{'search_default_filter_to_availabe_pos': 1, 'default_available_in_pos': True}"/>
|
||||
<field name="context" eval="{'search_default_filter_to_availabe_pos': 1, 'default_available_in_pos': True, 'create_variant_never': 'no_variant'}"/>
|
||||
</record>
|
||||
<record id="product_product_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Variants</field>
|
||||
@@ -47,6 +47,18 @@
|
||||
<field name="view_id" ref="product.product_category_list_view"/>
|
||||
</record>
|
||||
|
||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.only.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='attribute_line_ids']//field[@name='attribute_id']" position="attributes">
|
||||
<attribute name="context">{'default_create_variant': context.get('create_variant_never', 'always')}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
|
||||
Reference in New Issue
Block a user