diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py
index 0f9eb941513..029d47379cd 100644
--- a/addons/product/models/product_template.py
+++ b/addons/product/models/product_template.py
@@ -179,9 +179,10 @@ class ProductTemplate(models.Model):
for template in self:
template.currency_id = template.company_id.sudo().currency_id.id or main_company.currency_id.id
+ @api.depends('company_id')
@api.depends_context('company')
def _compute_cost_currency_id(self):
- self.cost_currency_id = self.env.company.currency_id.id
+ self.cost_currency_id = self.company_id.currency_id or self.env.company.currency_id.id
def _compute_template_field_from_variant_field(self, fname, default=False):
"""Sets the value of the given field based on the template variant values
diff --git a/addons/product/views/product_template_views.xml b/addons/product/views/product_template_views.xml
index 44a6c037680..4c49b7abcad 100644
--- a/addons/product/views/product_template_views.xml
+++ b/addons/product/views/product_template_views.xml
@@ -15,7 +15,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml
index 73045a4df80..f10e997e767 100644
--- a/addons/product/views/product_views.xml
+++ b/addons/product/views/product_views.xml
@@ -338,9 +338,9 @@
-
+
-
+