forked from OCA/product-attribute
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproduct_view.xml
executable file
·39 lines (35 loc) · 1.79 KB
/
product_view.xml
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
37
38
39
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="product_normal_form_view">
<field name="name">product_normal_form_view</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="weight" position="before">
<group name="dimensions" string="Dimensions">
<field name="dimensional_uom_id"/>
<field name="length" attrs="{'readonly':[('type','=','service')]}"/>
<field name="height" attrs="{'readonly':[('type','=','service')]}"/>
<field name="width" attrs="{'readonly':[('type','=','service')]}"/>
</group>
</group>
</field>
</record>
<record model="ir.ui.view" id="product_template_only_form_view">
<field name="name">product_template_form_view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<group name="weight" position="before">
<group name="dimensions" string="Dimensions" attrs="{'invisible': [('product_variant_count', '>', 1)]}">
<field name="dimensional_uom_id" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
<field name="length" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/>
<field name="height" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/>
<field name="width" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/>
</group>
</group>
</field>
</record>
</data>
</openerp>