[FIX] product: keep precision in historized cost field.

Now we use the same decimal precision for cost in table 'Historization cost'
and 'product'.

It is one fix, but that will not fix the case where decimal precision has been
updated between 2 historizations.

This commit closes #12861
This commit is contained in:
Jeremy Kersten 2016-07-25 17:31:30 +02:00
parent 64c80ddb4a
commit 78f00700e3
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ class produce_price_history(osv.osv):
'company_id': fields.many2one('res.company', required=True),
'product_template_id': fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade'),
'datetime': fields.datetime('Historization Time'),
'cost': fields.float('Historized Cost'),
'cost': fields.float('Historized Cost', digits_compute=dp.get_precision('Product Price')),
}
def _get_default_company(self, cr, uid, context=None):