[FIX] Stock : Unlink() of Move corrected
bzr revid: gpa@tinyerp.com-20100512122204-m1vws90u9apxpzn7
This commit is contained in:
parent
1c2b3fad8a
commit
f93cca1e7e
|
@ -1621,6 +1621,8 @@ class stock_move(osv.osv):
|
|||
return True
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
if move.state != 'draft':
|
||||
raise osv.except_osv(_('UserError'),
|
||||
|
|
Loading…
Reference in New Issue