File: product_template_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (32 lines) | stat: -rw-r--r-- 1,549 bytes parent folder | download
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
<?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" invisible="not has_configurable_attributes">
                    <group string="Sales Variant Selection">
                        <field name="has_configurable_attributes" invisible="1"/>
                        <field name="product_add_mode" widget="radio" nolabel="1" colspan="2"/>
                    </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_template_view_form"/>
        <field name="arch" type="xml">
            <field name="optional_product_ids" position="before">
                <field name="product_add_mode" widget="radio" invisible="1"/>
            </field>
            <field name="optional_product_ids" position="attributes">
                <attribute name="invisible">product_add_mode == 'grid'</attribute>
            </field>
        </field>
    </record>
</odoo>