[FIX] stock: on partial picking, do no open a new window action if not needed

This is related to rev. dd4d72d

Not opening a new window action allows to keep the current list of stock picking being threated, and to use the next an previous arrow of the forom view of the web client.
This commit is contained in:
Denis Ledoux 2014-09-04 12:28:16 +02:00
parent 73072272de
commit 5872c2485d
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,8 @@ class stock_partial_picking(osv.osv_memory):
# We don't need to find which view is required, stock.picking does it.
done = stock_picking.do_partial(
cr, uid, [partial.picking_id.id], partial_data, context=context)
if done[partial.picking_id.id]['delivered_picking'] == partial.picking_id.id:
return {'type': 'ir.actions.act_window_close'}
return {
'type': 'ir.actions.act_window',
'res_model': context.get('active_model', 'stock.picking'),