Skip to content

Commit

Permalink
[IMP] stock_quant_stock_info: decimal precision in quant cost fields
Browse files Browse the repository at this point in the history
  • Loading branch information
agaldona committed Aug 24, 2016
1 parent 3336beb commit ec00124
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stock_quant_stock_info/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
Expand Down
4 changes: 2 additions & 2 deletions stock_quant_stock_info/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
Expand All @@ -18,7 +18,7 @@

{
"name": "Quants stock info",
"version": "1.0",
"version": "8.0.1.0.0",
"depends": [
"stock",
],
Expand Down
2 changes: 1 addition & 1 deletion stock_quant_stock_info/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
Expand Down
5 changes: 4 additions & 1 deletion stock_quant_stock_info/models/stock_quant.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################

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


class StockQuant(models.Model):
_inherit = 'stock.quant'

cost = fields.Float(digits=dp.get_precision('Product Price'))
inventory_value = fields.Float(digits=dp.get_precision('Product Price'))
product_incoming_qty = fields.Float(
string='Incoming Product', related='product_id.incoming_qty',
help="Quantity of products that are planned to arrive.\n"
Expand Down

0 comments on commit ec00124

Please sign in to comment.