Skip to content

Commit

Permalink
[IMP] stock_quant_valuation: decimal precision for valuation cost fields
Browse files Browse the repository at this point in the history
  • Loading branch information
agaldona committed Aug 24, 2016
1 parent d99adee commit 2b4574d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stock_quant_valuation/models/stock_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from openerp import fields, api, models
from openerp.addons import decimal_precision as dp


class StockQuant(models.Model):
Expand All @@ -23,6 +24,8 @@ def _compute_real_value(self):
record.real_value = record.cost * record.qty

manual_value = fields.Float(
string="Manual Value", store=True, compute="_compute_manual_value")
string="Manual Value", store=True, compute="_compute_manual_value",
digits=dp.get_precision('Product Price'))
real_value = fields.Float(
string="Real Value", store=True, compute="_compute_real_value")
string="Real Value", store=True, compute="_compute_real_value",
digits=dp.get_precision('Product Price'))

0 comments on commit 2b4574d

Please sign in to comment.