blob: 58b85e8598e4b6cf3cc742c88739912dc80ea89b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_template_grid_view_form" model="ir.ui.view">
<field name="name">product.template.form.inherit.sale.product.matrix</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="//page[@name='variants']" position="inside">
<group name="product_mode" attrs="{'invisible': [('has_configurable_attributes', '=', False)]}">
<group string="Sales Variant Selection">
<field name="has_configurable_attributes" invisible="1"/>
<field name="product_add_mode" widget="radio" nolabel="1"/>
</group>
</group>
</xpath>
</field>
</record>
<record id="product_template_view_form" model="ir.ui.view">
<field name="name">product.template.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="sale_product_configurator.product_template_view_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='options']" position="inside">
<field name="product_add_mode" widget="radio" invisible="1"/>
<!--
Field is only needed as invisible on product variants view
-->
</xpath>
<xpath expr="//group[@name='options']" position="attributes">
<!-- HIDE optional products many2many when product is added through the grid to SOLines -->
<attribute name="attrs">{'invisible': [('product_add_mode', '=', 'grid')]}</attribute>
</xpath>
</field>
</record>
</odoo>
|