[IMP] respect product decimal precision

https://github.com/odoo/odoo/issues/5512 and b3e5a940e3 makes it clear the standard intends to support decimal precision on the product form.
This commit is contained in:
Lionel Sausin
2015-03-02 17:58:51 +01:00
parent 83a85c8ed9
commit c7d0f18fcf

View File

@@ -19,7 +19,7 @@
##############################################################################
from openerp import models, fields, api
#from openerp.addons import decimal_precision as dp
from openerp.addons import decimal_precision as dp
class ProductTemplate(models.Model):
@@ -42,11 +42,10 @@ class ProductTemplate(models.Model):
product.immediately_usable_qty = product.virtual_available
immediately_usable_qty = fields.Float(
digits=dp.get_precision('Product Unit of Measure'),
compute='_product_available',
string='Available to promise',
help="Stock for this Product that can be safely proposed "
"for sale to Customers.\n"
"The definition of this value can be configured to suit "
"your needs")
# XXX the standard doesn't honor the UoM decimal precision. Should we?
# digits=dp.get_precision('Product Unit of Measure'),