[FIX] product: creation of reference uom
authorMartin Trigaux <mat@odoo.com>
Mon, 24 Nov 2014 09:51:23 +0000 (10:51 +0100)
committerMartin Trigaux <mat@odoo.com>
Mon, 24 Nov 2014 10:04:50 +0000 (11:04 +0100)
commit4ce7af357317886cfd7f08e7b1e23c6a56d9f431
treed8a6bc975e4e98e7fb172be1ba4b1568b1dc3077
parent529e920b2cc4673188dd209f91196a35dfdb7790
[FIX] product: creation of reference uom

Set a default value for factor when creating a new uom.
Could not create a new UoM with type reference (if creates a reference uom, no need to pass a factor).

Change the readonly filter to (type = bigger) to make the field writable for reference uom.
This is needed to force the reset of the factor when switching of type (onchange_type).
As the field was readonly, kept the old value for factor.
addons/product/product.py
addons/product/product_view.xml