diff --git a/purchase.py b/purchase.py
index dbe945d0b3..af7146b48f 100644
--- a/purchase.py
+++ b/purchase.py
@@ -474,6 +474,8 @@ class PurchaseRequisitionLine(sequence_ordered(), ModelSQL, ModelView):
fields.Integer('Unit Digits'), 'on_change_with_unit_digits')
unit_price = fields.Numeric(
'Unit Price', digits=price_digits, states=_states, depends=_depends)
+ currency = fields.Function(fields.Many2One('currency.currency',
+ 'Currency'), 'on_change_with_currency')
amount = fields.Function(
fields.Numeric('Amount',
digits=(
@@ -507,6 +509,11 @@ class PurchaseRequisitionLine(sequence_ordered(), ModelSQL, ModelView):
if self.product:
return self.product.default_uom_category.id
+ @fields.depends('requisition', '_parent_requisition.currency')
+ def on_change_with_currency(self, name=None):
+ if self.requisition:
+ return self.requisition.currency.id
+
@classmethod
def get_purchase_requisition_states(cls):
pool = Pool()
diff --git a/view/purchase_requisition_form.xml b/view/purchase_requisition_form.xml
index 577211ea91..92e3284dd9 100644
--- a/view/purchase_requisition_form.xml
+++ b/view/purchase_requisition_form.xml
@@ -22,7 +22,7 @@ this repository contains the full copyright notices and license terms. -->
-
+
diff --git a/view/purchase_requisition_line_form.xml b/view/purchase_requisition_line_form.xml
index efe99e59db..e4fca4112a 100644
--- a/view/purchase_requisition_line_form.xml
+++ b/view/purchase_requisition_line_form.xml
@@ -17,9 +17,9 @@ this repository contains the full copyright notices and license terms. -->
-
+
-
+
diff --git a/view/purchase_requisition_line_list.xml b/view/purchase_requisition_line_list.xml
index c81ba00886..ce0f841857 100644
--- a/view/purchase_requisition_line_list.xml
+++ b/view/purchase_requisition_line_list.xml
@@ -5,8 +5,7 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
-
+
+
+
diff --git a/view/purchase_requisition_line_list_sequence.xml b/view/purchase_requisition_line_list_sequence.xml
index 0dd6bb68e0..092cc6c055 100644
--- a/view/purchase_requisition_line_list_sequence.xml
+++ b/view/purchase_requisition_line_list_sequence.xml
@@ -5,8 +5,7 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
-
+
+
+
diff --git a/view/purchase_requisition_tree.xml b/view/purchase_requisition_tree.xml
index accec67fc3..828fc32509 100644
--- a/view/purchase_requisition_tree.xml
+++ b/view/purchase_requisition_tree.xml
@@ -6,7 +6,6 @@ this repository contains the full copyright notices and license terms. -->
-
-
+