[IMP]: improvement for set in order by data
bzr revid: ksa@tinyerp.co.in-20110308065944-rdaw3maa69gv8sbd
This commit is contained in:
parent
ddf5c95aa8
commit
66ca9a91f0
|
@ -74,18 +74,23 @@ class stock_fill_inventory(osv.osv_memory):
|
||||||
if fill_inventory.recursive :
|
if fill_inventory.recursive :
|
||||||
location_ids = location_obj.search(cr, uid, [('location_id',
|
location_ids = location_obj.search(cr, uid, [('location_id',
|
||||||
'child_of', fill_inventory.location_id.id)])
|
'child_of', fill_inventory.location_id.id)])
|
||||||
|
|
||||||
for location in location_ids :
|
for location in location_ids :
|
||||||
res = location_obj._product_get(cr, uid, location)
|
res = location_obj._product_get(cr, uid, location)
|
||||||
res_location[location] = res
|
res_location[location] = res
|
||||||
|
data = res_location.keys()
|
||||||
|
data.sort()
|
||||||
else:
|
else:
|
||||||
context.update({'compute_child': False})
|
context.update({'compute_child': False})
|
||||||
res = location_obj._product_get(cr, uid,
|
res = location_obj._product_get(cr, uid,
|
||||||
fill_inventory.location_id.id, context=context)
|
fill_inventory.location_id.id, context=context)
|
||||||
res_location[fill_inventory.location_id.id] = res
|
res_location[fill_inventory.location_id.id] = res
|
||||||
|
data = res_location.keys()
|
||||||
|
data.sort()
|
||||||
|
|
||||||
product_ids = []
|
product_ids = []
|
||||||
res = {}
|
res = {}
|
||||||
for location in res_location.keys():
|
for location in data:
|
||||||
datas = {}
|
datas = {}
|
||||||
res[location] = {}
|
res[location] = {}
|
||||||
if fill_inventory.recursive :
|
if fill_inventory.recursive :
|
||||||
|
|
Loading…
Reference in New Issue