From 21ccf2fe1c9ed2f6e16ded5f0e5751eebfc082e2 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 20 Apr 2016 10:05:09 +0200 Subject: [PATCH] [FIX] stock: remove spaces surrounding the `/` in locations complete name The location name get is computed as: `parent.name + '/' + child.name` While, the complete was computed as: `parent.name + ' / ' + child.name` This leaded to an obvious inconsistency. Besides, this prevented to use the `location` filter in the search of the products list to know the quantity available of products for a specifc location, as the domain used to retrieve the locations is set as `[('complete_name','ilike',context['location'])]` `context['location']` containing the content of the `name_get` (No spaces surrounding `/`) and `complete_name` surrounding `/` with spaces. opw-674378 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 96937d3463d..dab4f6a3c16 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -61,7 +61,7 @@ class stock_location(osv.osv): res[m.id] = m.name parent = m.location_id while parent: - res[m.id] = parent.name + ' / ' + res[m.id] + res[m.id] = parent.name + '/' + res[m.id] parent = parent.location_id return res