From 7bbbc6f12d0ba0337808a5b15387c0820ea42203 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 29 Mar 2017 14:48:01 +0200 Subject: [PATCH] [FIX] account: decimal precision Missing decimal precisions. opw-726110 --- addons/account/models/account_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index bf5234366a2..c340eecb937 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -8,6 +8,7 @@ from odoo.exceptions import RedirectWarning, UserError, ValidationError from odoo.tools.misc import formatLang from odoo.tools import float_is_zero, float_compare from odoo.tools.safe_eval import safe_eval +import odoo.addons.decimal_precision as dp from lxml import etree #---------------------------------------------------------- @@ -357,7 +358,7 @@ class AccountMoveLine(models.Model): self.counterpart = ",".join(counterpart) name = fields.Char(required=True, string="Label") - quantity = fields.Float(digits=(16, 2), + quantity = fields.Float(digits=dp.get_precision('Product Unit of Measure'), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports.") product_uom_id = fields.Many2one('product.uom', string='Unit of Measure') product_id = fields.Many2one('product.product', string='Product')