From e10ed4f7f091a1110e71d5e677243f3dd8d00c27 Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Thu, 19 Mar 2026 10:44:02 +0100 Subject: [PATCH] [17.0][FIX] stock _find_or_create_global_route search route name passing lang to context --- addons/stock/models/stock_warehouse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index d0ec4c6b2210b..39b02275567ea 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -389,7 +389,8 @@ def _find_or_create_global_route(self, xml_id, route_name, create=True, raise_if data_route = route = self.env.ref(xml_id, raise_if_not_found=False) company = self.company_id[:1] or self.env.company if not route or (route.sudo().company_id and route.sudo().company_id != company): - route = self.env['stock.route'].with_context(active_test=False).search([ + # search route with user lang as `route_name` is translated + route = self.env['stock.route'].with_context(lang=self.env.user.lang, active_test=False).search([ ('name', 'like', route_name), ('company_id', 'in', [False, company.id]) ], order='company_id', limit=1) if not route: