Add patch for issue5370

This commit is contained in:
Sergi Almacellas Abellana 2016-03-08 10:20:20 +01:00
parent cf087c1939
commit a248752347
2 changed files with 42 additions and 0 deletions

41
issue5370.diff Normal file
View File

@ -0,0 +1,41 @@
diff -r 9b5fafd2c656 trytond/trytond/modules/account_invoice/invoice.py
--- a/trytond/trytond/modules/account_invoice/invoice.py Tue Mar 08 10:16:56 2016 +0100
+++ b/trytond/trytond/modules/account_invoice/invoice.py Tue Mar 08 10:18:43 2016 +0100
@@ -464,8 +464,7 @@
def round_taxes():
if self.currency:
for value in computed_taxes.itervalues():
- for field in ('base', 'amount'):
- value[field] = self.currency.round(value[field])
+ value['amount'] = self.currency.round(value['amount'])
if self.lines:
context = self.get_tax_context()
@@ -482,6 +481,8 @@
for tax in taxes:
key, val = self._compute_tax(tax,
self.type or 'out_invoice')
+ if self.currency:
+ val['base'] = self.currency.round(val['base'])
if key not in computed_taxes:
computed_taxes[key] = val
else:
@@ -845,8 +846,7 @@
def round_taxes():
for value in taxes.itervalues():
- for field in ('base', 'amount'):
- value[field] = self.currency.round(value[field])
+ value['amount'] = self.currency.round(value['amount'])
for line in self.lines:
if line.type != 'line':
@@ -858,6 +858,8 @@
for tax in tax_list:
key, val = self._compute_tax(tax, self.type)
val['invoice'] = self.id
+ if self.currency:
+ val['base'] = self.currency.round(val['base'])
if key not in taxes:
taxes[key] = val
else:

1
series
View File

@ -76,6 +76,7 @@ account_chart_speedup.diff
issue21611002_20001.diff
issue4536.diff
improve_stock_by_locations_performance.diff
issue5370.diff
# Ignore next patches
#incremental_wait_in_retries.diff
# Uncomment in calfruitos