[FIX] stock: barcode interface, do not reload locations all the time
Locations were search & read each time you changed the quantity of a product in a picking. Once the locations loaded the firs time, this is unlikely the locations will change during the operation. It shoudln't, at least. Therefore, for performances, we avoid to load the locations each time the picking is reloaded. opw-648529 Fixes #8344master
parent
adf6d0e557
commit
da667b573d
|
@ -690,6 +690,9 @@ function openerp_picking_widgets(instance){
|
|||
}
|
||||
|
||||
return loaded_picking.then(function(){
|
||||
if (!_.isEmpty(self.locations)){
|
||||
return $.when();
|
||||
}
|
||||
return new instance.web.Model('stock.location').call('search',[[['usage','=','internal']]]).then(function(locations_ids){
|
||||
return new instance.web.Model('stock.location').call('read',[locations_ids, []]).then(function(locations){
|
||||
self.locations = locations;
|
||||
|
|
Loading…
Reference in New Issue