[IMP] stock: raise an exception when picking cancels done moves

bzr revid: sbh@tinyerp.com-20100916130940-l3jnsgqhjjavrq4t
This commit is contained in:
sbh (Open ERP) 2010-09-16 18:39:40 +05:30
parent b792ea494e
commit d0e25ef964
1 changed files with 1 additions and 1 deletions

View File

@ -1096,7 +1096,7 @@ class stock_picking(osv.osv):
return True
for move in pick.move_lines:
if move.state == 'done':
return False
raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state !'))
return True
def unlink(self, cr, uid, ids, context=None):
move_obj = self.pool.get('stock.move')