[FIX] MRP : Cancellation of procurement allowed if it has no moves attached
authorDukai Gabor <>
Tue, 31 Aug 2010 09:20:38 +0000 (14:50 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Tue, 31 Aug 2010 09:20:38 +0000 (14:50 +0530)
lp bug: https://launchpad.net/bugs/626695 fixed

bzr revid: jvo@tinyerp.com-20100831092038-z28pjcia2pmdxukv

addons/mrp/mrp.py

index 6653a3b..fe43a65 100644 (file)
@@ -1111,7 +1111,7 @@ class mrp_procurement(osv.osv):
         todo = []
         todo2 = []
         for proc in self.browse(cr, uid, ids):
-            if proc.close_move:
+            if proc.close_move and proc.move_id:
                 if proc.move_id.state not in ('done','cancel'):
                     todo2.append(proc.move_id.id)
             else: