credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05840
[Merge] lp:~credativ/openobject-addons/7.0-rounding-fix-posting-inventory into lp:openobject-addons/7.0
Jacob Hicks (credativ) has proposed merging lp:~credativ/openobject-addons/7.0-rounding-fix-posting-inventory into lp:openobject-addons/7.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1184192 in OpenERP Addons: "Unedited products are shown on posted inventory tab"
https://bugs.launchpad.net/openobject-addons/+bug/1184192
For more details, see:
https://code.launchpad.net/~credativ/openobject-addons/7.0-rounding-fix-posting-inventory/+merge/212208
--
https://code.launchpad.net/~credativ/openobject-addons/7.0-rounding-fix-posting-inventory/+merge/212208
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/7.0-rounding-fix-posting-inventory.
=== modified file 'stock/stock.py'
--- stock/stock.py 2014-03-13 09:50:54 +0000
+++ stock/stock.py 2014-03-21 17:21:42 +0000
@@ -2852,7 +2852,8 @@
pid = line.product_id.id
product_context.update(uom=line.product_uom.id, to_date=inv.date, date=inv.date, prodlot_id=line.prod_lot_id.id)
amount = location_obj._product_get(cr, uid, line.location_id.id, [pid], product_context)[pid]
- change = line.product_qty - amount
+ digit_precision = dp.get_precision('Product UoM')(cr)[1]
+ change = round(line.product_qty,digit_precision) - round(amount,digit_precision)
lot_id = line.prod_lot_id.id
if change:
location_id = line.product_id.property_stock_inventory.id
Follow ups