[FIX] stock: speed up backorder creation in barcode ui

Set no_recompute to True
in order to speed up barcode picking UI

This is done for the same reason than
7b306fc17a
merged through #6754.

The remaining quantities will be computed in the
`do_transfer` method, thanks to the call
`picking_recompute_remaining_quantities`.

There is therefore no need to recompute
the remaining quantities for each pack operation.

Closes #9142
opw-645883
This commit is contained in:
Jos De Graeve 2015-10-19 18:58:14 +02:00 committed by Denis Ledoux
parent 5a4884f017
commit 92bfe3208a
1 changed files with 1 additions and 1 deletions

View File

@ -1490,7 +1490,7 @@ class stock_picking(osv.osv):
#write qty_done into field product_qty for every package_operation before doing the transfer
pack_op_obj = self.pool.get('stock.pack.operation')
for operation in self.browse(cr, uid, picking_id, context=context).pack_operation_ids:
pack_op_obj.write(cr, uid, operation.id, {'product_qty': operation.qty_done}, context=context)
pack_op_obj.write(cr, uid, operation.id, {'product_qty': operation.qty_done}, context=dict(context, no_recompute=True))
self.do_transfer(cr, uid, [picking_id], context=context)
#return id of next picking to work on
return self.get_next_picking_for_ui(cr, uid, context=context)