From 570cb44c53ec0ba800796587b5e98893deee1521 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Fri, 26 Jun 2026 06:57:56 -0500 Subject: [PATCH] [FIX] product_contract: Use the correct language in the sale order line to translate terms correctly When a product has a translated name, it is not correctly stored in the sale.order.line name field because the language context is lost in this function. --- product_contract/models/sale_order_line.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/product_contract/models/sale_order_line.py b/product_contract/models/sale_order_line.py index cd2ffa3fc4..78a0827b96 100644 --- a/product_contract/models/sale_order_line.py +++ b/product_contract/models/sale_order_line.py @@ -212,6 +212,9 @@ def _compute_name(self): res = super()._compute_name() for line in self: if line.is_contract: + lang = line.order_id._get_lang() + if lang != self.env.lang: + line = line.with_context(lang=lang) if line.contract_start_date_method == "manual": date_text = f"{line.date_start}" if line.date_end: