[FIX] product, stock_account: volume, weight, standard price in product template
When a product template has several variants, the fields volume, weight and standard price don't have be displayed in the prodcut template form view. opw:669240
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
</group>
|
||||
<group name="group_standard_price">
|
||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||
<label for="standard_price" groups="base.group_user"/>
|
||||
<label for="standard_price" groups="base.group_user" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
<div name="standard_price_uom" groups="base.group_user">
|
||||
<field name="standard_price" widget='monetary' options="{'currency_field': 'currency_id'}" class="oe_inline"/>
|
||||
</div>
|
||||
@@ -126,12 +126,12 @@
|
||||
<field name="categ_id" string="Internal Category"/>
|
||||
</group>
|
||||
<group name="group_lots_and_weight">
|
||||
<label for="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/>
|
||||
<div class="o_row" name="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}">
|
||||
<label for="weight" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/>
|
||||
<div class="o_row" name="weight" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}">
|
||||
<field name="weight" string="Weight"/>
|
||||
</div>
|
||||
<label for="volume" attrs="{'invisible':[('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/>
|
||||
<div class="o_row" name="volume" attrs="{'invisible':[('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}">
|
||||
<label for="volume" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/>
|
||||
<div class="o_row" name="volume" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}">
|
||||
<field name="volume" string="Volume"/>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</field>
|
||||
<field name="standard_price" position="replace">
|
||||
<field name="standard_price"
|
||||
attrs="{'readonly':['&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" class="oe_inline"
|
||||
attrs="{'readonly':['&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])], 'invisible': [('product_variant_count', '>', 1)]}" class="oe_inline"
|
||||
widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||
</field>
|
||||
<div name="standard_price_uom" position="after">
|
||||
|
||||
Reference in New Issue
Block a user