Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX][10.0] product_dimension: dont depend on stock
- Loading branch information
1 parent
6db0ba3
commit 43c379f
Showing
2 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
|
||
<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_variant_easy_edit_view"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//label[@for='volume']" position="before"> | ||
<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')]}"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record model="ir.ui.view" id="product_template_only_form_view"> | ||
<field name="name">product.template with properties and dimensions</field> | ||
<field name="model">product.template</field> | ||
<field name="inherit_id" ref="stock.view_template_property_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="tracking" position="after"> | ||
<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)]}"/> | ||
<record model="ir.ui.view" id="product_template_form_view"> | ||
<field name="name">product.template with properties and dimensions</field> | ||
<field name="model">product.template</field> | ||
<field name="inherit_id" ref="product.product_template_form_view"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//notebook" position="inside"> | ||
<page string="Dimensions" name="dimensions"> | ||
<group> | ||
<group> | ||
<field name="length" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/> | ||
<field name="width" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/> | ||
<field name="height" attrs="{'readonly':[('type','=','service')],'invisible': [('product_variant_count', '>', 1)]}"/> | ||
<field name="dimensional_uom_id" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/> | ||
</group> | ||
</group> | ||
</page> | ||
</xpath> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |