Add missing rounding on default computed tax amounts for issue1247
(transplanted from ed3e1afa545901dbf1e15ec482b7e9c2458956e8)
This commit is contained in:
1 parent
7a6440409e
commit
993f09e1bc
1 file changed
+5
@@ -526,6 +526,7 @@ class Line(OSV):
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
account_obj = self.pool.get('account.account')
|
||||
tax_code_obj = self.pool.get('account.tax.code')
|
||||
currency_obj = self.pool.get('currency.currency')
|
||||
values = super(Line, self).default_get(cursor, user, fields,
|
||||
context=context)
|
||||
|
||||
@@ -638,6 +639,10 @@ class Line(OSV):
|
||||
line_amount -= tax_line['amount']
|
||||
tax_amount += tax_line['amount'] * \
|
||||
tax_line['tax'][key + '_tax_sign']
|
||||
line_amount = currency_obj.round(cursor, user,
|
||||
line.account.company.currency, line_amount)
|
||||
tax_amount = currency_obj.round(cursor, user,
|
||||
line.account.company.currency, tax_amount)
|
||||
if ('debit' in fields):
|
||||
values['debit'] = line_amount > Decimal('0.0') \
|
||||
and line_amount or Decimal('0.0')
|
||||
|
||||
Reference in new issue
Block a user