← Back to team overview

credativ team mailing list archive

[Branch ~credativ/openobject-addons/6.1] Rev 7057: [Fix] Invoice line subtotal rounding issue

 

------------------------------------------------------------
revno: 7057
fixes bug: https://launchpad.net/bugs/977300
committer: Kinner Vachhani <kin.vachhani@xxxxxxxxx>
branch nick: credativ-openobject
timestamp: Mon 2013-12-02 14:34:04 +0000
message:
  [Fix] Invoice line subtotal rounding issue
modified:
  account/account.py


--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1

Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'account/account.py'
--- account/account.py	2013-05-03 14:19:28 +0000
+++ account/account.py	2013-12-02 14:34:04 +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: