[FIX] product: ratio help tooltip according to type in UOMs

In the form view of a unit of measure,
if the unit of measure was of type
"Bigger than the reference unit"
The help in the tooltip of the ratio field was wrong
Besides, this help message was contradictory
with the formula written just below the field.

opw-631672
This commit is contained in:
Denis Ledoux 2015-03-31 10:58:43 +02:00
parent 0a1f52ccb5
commit e311a423cd
1 changed files with 14 additions and 17 deletions

View File

@ -419,23 +419,20 @@
<field name="name"/>
<field name="category_id"/>
<field name="uom_type" on_change="onchange_type(uom_type)"/>
<label for="factor"/>
<div>
<field name="factor"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','smaller')],
'readonly':[('uom_type','=','bigger')]}"/>
<field name="factor_inv"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','bigger')],
'readonly':[('uom_type','!=','bigger')]}"/>
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" class="oe_grey">
e.g: 1 * (reference unit) = ratio * (this unit)
</p>
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" class="oe_grey">
e.g: 1 * (this unit) = ratio * (reference unit)
</p>
</div>
<field name="factor"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','smaller')],
'readonly':[('uom_type','=','bigger')]}"/>
<field name="factor_inv"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','bigger')],
'readonly':[('uom_type','!=','bigger')]}"/>
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" class="oe_grey" colspan="2">
e.g: 1 * (reference unit) = ratio * (this unit)
</p>
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" class="oe_grey" colspan="2">
e.g: 1 * (this unit) = ratio * (reference unit)
</p>
</group>
<group>
<field name="active"/>