← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openobject-addons/trunk-bugfix-1284238 into lp:openobject-addons

 

Andres Calle (TRESCLOUD) has proposed merging lp:~openerp-community/openobject-addons/trunk-bugfix-1284238 into lp:openobject-addons.

Requested reviews:
  Amit Parik (amit-parik)
Related bugs:
  Bug #1284238 in OpenERP Addons: "Stock valuation misscalculation for product quantities with more than 2 decimal positions"
  https://bugs.launchpad.net/openobject-addons/+bug/1284238

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bugfix-1284238/+merge/210733

According to bug https://bugs.launchpad.net/openobject-addons/+bug/1284238

The field product quantity in account.move.line is saved with only 2 decimal positions while it should be with as many decimal positions as the product.
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bugfix-1284238/+merge/210733
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/trunk-bugfix-1284238.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2014-01-15 21:44:54 +0000
+++ account/account_move_line.py	2014-03-13 03:07:34 +0000
@@ -433,7 +433,7 @@
 
     _columns = {
         'name': fields.char('Name', size=64, required=True),
-        'quantity': fields.float('Quantity', digits=(16,2), 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."),
+        'quantity': fields.float('Quantity', digits_compute=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', 'Unit of Measure'),
         'product_id': fields.many2one('product.product', 'Product'),
         'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),


Follow ups