diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 46d523d7546..ab71d162ceb 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -63,6 +63,9 @@ class stock_return_picking(osv.osv_memory): result1 = [] if context is None: context = {} + if context and context.get('active_ids', False): + if len(context.get('active_ids')) > 1: + raise osv.except_osv(_('Warning!'), _("You may only return one picking at a time!")) res = super(stock_return_picking, self).default_get(cr, uid, fields, context=context) record_id = context and context.get('active_id', False) or False pick_obj = self.pool.get('stock.picking')