[MERGE] lp:778473

bzr revid: qdp-launchpad@openerp.com-20110530150655-pv24ogkrchnooib1
This commit is contained in:
Quentin (OpenERP) 2011-05-30 17:06:55 +02:00
commit 002d27a81e
1 changed files with 3 additions and 2 deletions

View File

@ -1126,7 +1126,7 @@ class stock_picking(osv.osv):
for pick in self.browse(cr, uid, ids, context=context):
if pick.state in ['done','cancel']:
raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state !')%(pick.state,))
elif pick.state in ['confirmed','assigned', 'draft']:
else:
ids2 = [move.id for move in pick.move_lines]
ctx = context.copy()
ctx.update({'call_unlink':True})
@ -1315,7 +1315,8 @@ class stock_picking(osv.osv):
'assigned': _('is ready to process.'),
'cancel': _('is cancelled.'),
'done': _('is done.'),
'draft':_('is in draft state.'),
'auto': _('is waiting.'),
'draft': _('is in draft state.'),
}
res = data_obj.get_object_reference(cr, uid, 'stock', view_list.get(pick.type, 'view_picking_form'))
context.update({'view_id': res and res[1] or False})