[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
This commit is contained in:
Denis Ledoux
2016-04-20 10:12:45 +02:00
parent bdfc75e613
commit 21ccf2fe1c
+1 -1
View File
@@ -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