[FIX] stock: return picking wizard handles one picking at a time

We force the user to select only one picking at a time. The reason is that we
can choose the number of products to return for every picking, so it does not
make sense to group the returns in one picking.

opw-640030
This commit is contained in:
Nicolas Martinelli 2015-05-28 10:19:38 +02:00
parent 443605ce56
commit e33bcdec19
1 changed files with 3 additions and 0 deletions

View File

@ -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')