[REF] Including decimal precision on amount_residual calculated to avoid account move lines when we have little very little rounding problems

bzr revid: javier@vauxoo.com-20111011035646-7jn8z1p8dw6l3f40
This commit is contained in:
Javier Duran javier@vauxoo.com 2011-10-10 23:56:46 -04:00
parent cb6892b20b
commit 737fccbbc2
1 changed files with 2 additions and 2 deletions

View File

@ -864,8 +864,8 @@ class account_voucher(osv.osv):
move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or 0.0
voucher_line = move_line_obj.create(cr, uid, move_line)
rec_ids = [voucher_line, line.move_line_id.id]
if amount_residual: # Change difference entry
print "What the fuck %s"% (self.pool.get('decimal.precision').precision_get(cr,uid,'Account'))
if round(amount_residual,self.pool.get('decimal.precision').precision_get(cr,uid,'Account')): # Change difference entry
print "Amount Residual %s " % str(amount_residual)
exch_lines = self._get_exchange_lines(cr, uid, line, move_id,
amount_residual ,context)