[FIX][CRITICAL]subscription: crash subscription process
authorHarry (Open ERP) <hmo@tinyerp.com>
Wed, 23 Sep 2009 12:52:31 +0000 (18:22 +0530)
committerHarry (Open ERP) <hmo@tinyerp.com>
Wed, 23 Sep 2009 12:52:31 +0000 (18:22 +0530)
lp bug: https://launchpad.net/bugs/435178 fixed

bzr revid: hmo@tinyerp.com-20090923125231-skjg2hkhw3tbvdsz

addons/subscription/subscription.py

index a624232..7c4c80f 100644 (file)
@@ -98,6 +98,8 @@ class subscription_subscription(osv.osv):
 
     def model_copy(self, cr, uid, ids, context={}):
         for row in self.read(cr, uid, ids):
+            if not row.get('cron_id',False):
+                continue
             cron_ids = [row['cron_id'][0]]
             remaining = self.pool.get('ir.cron').read(cr, uid, cron_ids, ['numbercall'])[0]['numbercall']
             try: