← Back to team overview

credativ team mailing list archive

lp:~credativ/openobject-addons/6.1-lp977300-Invoice_line_subtotal_rounding_issue into lp:~credativ/openobject-addons/6.1

 

Kinner Vachhani has proposed merging lp:~credativ/openobject-addons/6.1-lp977300-Invoice_line_subtotal_rounding_issue into lp:~credativ/openobject-addons/6.1.

Requested reviews:
  Craig Gowing (credativ) (craiggowing)
Related bugs:
  Bug #977300 in OpenERP Addons: "Invoice line subtotal rounding issue"
  https://bugs.launchpad.net/openobject-addons/+bug/977300

For more details, see:
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp977300-Invoice_line_subtotal_rounding_issue/+merge/197403
-- 
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp977300-Invoice_line_subtotal_rounding_issue/+merge/197403
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
=== modified file 'account/account.py'
--- account/account.py	2013-05-03 14:19:28 +0000
+++ account/account.py	2013-12-02 15:25:24 +0000
@@ -29,6 +29,7 @@
 from osv import fields, osv
 import decimal_precision as dp
 from tools.translate import _
+from tools import float_round
 
 def check_cycle(self, cr, uid, ids, context=None):
     """ climbs the ``self._table.parent_id`` chains for 100 levels or
@@ -2099,7 +2100,7 @@
             }
         """
         precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
-        totalin = totalex = round(price_unit * quantity, precision)
+        totalin = totalex = float_round(price_unit * quantity, precision)
         tin = []
         tex = []
         for tax in taxes:


Follow ups