diff --git a/invoice.py b/invoice.py
index be00254836..cb15f166e2 100644
--- a/invoice.py
+++ b/invoice.py
@@ -2310,6 +2310,8 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
digits=(16, Eval('_parent_invoice', {}).get('currency_digits', 2)),
states=_states,
depends=['tax', 'base', 'manual'] + _depends)
+ currency = fields.Function(fields.Many2One('currency.currency',
+ 'Currency'), 'on_change_with_currency')
manual = fields.Boolean('Manual', states=_states, depends=_depends)
tax = fields.Many2One('account.tax', 'Tax',
ondelete='RESTRICT',
@@ -2364,6 +2366,11 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
if self.invoice:
return self.invoice.state
+ @fields.depends('invoice', '_parent_invoice.currency')
+ def on_change_with_currency(self, name=None):
+ if self.invoice:
+ return self.invoice.currency.id
+
@fields.depends('tax', 'invoice', '_parent_invoice.party', 'base')
def on_change_tax(self):
Tax = Pool().get('account.tax')
diff --git a/payment_term.py b/payment_term.py
index 1c12f37565..44029487bb 100644
--- a/payment_term.py
+++ b/payment_term.py
@@ -394,7 +394,9 @@ class TestPaymentTermView(ModelView):
for date, amount in self.payment_term.compute(
self.amount, self.currency, self.date):
result.append(Result(
- date=date, amount=amount,
+ date=date,
+ amount=amount,
+ currency=self.currency,
currency_digits=self.currency.digits))
self.result = result
return self._changed_values.get('result', [])
@@ -406,4 +408,5 @@ class TestPaymentTermViewResult(ModelView):
date = fields.Date('Date', readonly=True)
amount = fields.Numeric('Amount', readonly=True,
digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
+ currency = fields.Many2One('currency.currency', "Currency")
currency_digits = fields.Integer('Currency Digits')
diff --git a/view/invoice_form.xml b/view/invoice_form.xml
index 27e21a8050..963a686dd1 100644
--- a/view/invoice_form.xml
+++ b/view/invoice_form.xml
@@ -40,11 +40,11 @@ this repository contains the full copyright notices and license terms. -->
-
+
-
+
-
+
@@ -67,9 +67,9 @@ this repository contains the full copyright notices and license terms. -->
-
+
-
+
diff --git a/view/invoice_line_form.xml b/view/invoice_line_form.xml
index 4ecddb1025..0caeed12b7 100644
--- a/view/invoice_line_form.xml
+++ b/view/invoice_line_form.xml
@@ -19,9 +19,9 @@ this repository contains the full copyright notices and license terms. -->
-
+
-
+
diff --git a/view/invoice_line_tree.xml b/view/invoice_line_tree.xml
index 273ad43df3..be99220d19 100644
--- a/view/invoice_line_tree.xml
+++ b/view/invoice_line_tree.xml
@@ -6,9 +6,8 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
+
+
-
+
diff --git a/view/invoice_line_tree_sequence.xml b/view/invoice_line_tree_sequence.xml
index ea190e75ab..3d09536786 100644
--- a/view/invoice_line_tree_sequence.xml
+++ b/view/invoice_line_tree_sequence.xml
@@ -6,9 +6,8 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
+
+
-
+
diff --git a/view/invoice_tax_form.xml b/view/invoice_tax_form.xml
index 6345680410..0ede5f9adc 100644
--- a/view/invoice_tax_form.xml
+++ b/view/invoice_tax_form.xml
@@ -15,9 +15,9 @@ this repository contains the full copyright notices and license terms. -->
-
+
-
+
diff --git a/view/invoice_tax_tree.xml b/view/invoice_tax_tree.xml
index bf26dffedc..40bf01ad53 100644
--- a/view/invoice_tax_tree.xml
+++ b/view/invoice_tax_tree.xml
@@ -7,6 +7,6 @@ this repository contains the full copyright notices and license terms. -->
-
-
+
+
diff --git a/view/invoice_tax_tree_sequence.xml b/view/invoice_tax_tree_sequence.xml
index 316bd366b1..134aa3d260 100644
--- a/view/invoice_tax_tree_sequence.xml
+++ b/view/invoice_tax_tree_sequence.xml
@@ -3,8 +3,8 @@
this repository contains the full copyright notices and license terms. -->
-
-
+
+
diff --git a/view/invoice_tree.xml b/view/invoice_tree.xml
index 2981e6ca03..2da090ebb2 100644
--- a/view/invoice_tree.xml
+++ b/view/invoice_tree.xml
@@ -7,12 +7,11 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
-
+
+
+
-
+
diff --git a/view/move_line_list_payment.xml b/view/move_line_list_payment.xml
index a566c46ad2..2f49f433e3 100644
--- a/view/move_line_list_payment.xml
+++ b/view/move_line_list_payment.xml
@@ -3,9 +3,7 @@
this repository contains the full copyright notices and license terms. -->
-
-
-
-
+
+
+
diff --git a/view/move_line_list_to_pay.xml b/view/move_line_list_to_pay.xml
index 5d3214f87b..bd697950dc 100644
--- a/view/move_line_list_to_pay.xml
+++ b/view/move_line_list_to_pay.xml
@@ -3,10 +3,7 @@
this repository contains the full copyright notices and license terms. -->
-
-
-
-
-
-
+
+
+
diff --git a/view/payment_term_line_list.xml b/view/payment_term_line_list.xml
index bdfe88bf18..ce6e821d1f 100644
--- a/view/payment_term_line_list.xml
+++ b/view/payment_term_line_list.xml
@@ -7,6 +7,5 @@ this repository contains the full copyright notices and license terms. -->
-
-
+
diff --git a/view/payment_term_line_list_sequence.xml b/view/payment_term_line_list_sequence.xml
index 368317dbaa..8e7d8de463 100644
--- a/view/payment_term_line_list_sequence.xml
+++ b/view/payment_term_line_list_sequence.xml
@@ -6,6 +6,5 @@ this repository contains the full copyright notices and license terms. -->
-
-
+
diff --git a/view/payment_term_test_result_list.xml b/view/payment_term_test_result_list.xml
index 1f96d87c43..7d19fe2994 100644
--- a/view/payment_term_test_result_list.xml
+++ b/view/payment_term_test_result_list.xml
@@ -3,5 +3,5 @@
this repository contains the full copyright notices and license terms. -->
-
+