Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/stock/models/stock_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down