From 5872c2485d8351b6e0569009b4828448fed69622 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 4 Sep 2014 12:28:16 +0200 Subject: [PATCH] [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. --- addons/stock/wizard/stock_partial_picking.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 7358855924d..6d41deeb85e 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -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'),