[FIX] modifying a cron from client make it run concurrently multiple times

bzr revid: jvo@tinyerp.com-20100514085525-op7lvavl8aq6lakz
This commit is contained in:
Jay (Open ERP)
2010-05-14 14:25:25 +05:30
parent a212406285
commit 1979d23ded
+3
View File
@@ -146,16 +146,19 @@ class ir_cron(osv.osv, netsvc.Agent):
def create(self, cr, uid, vals, context=None):
res = super(ir_cron, self).create(cr, uid, vals, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
def write(self, cr, user, ids, vals, context=None):
res = super(ir_cron, self).write(cr, user, ids, vals, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
def unlink(self, cr, uid, ids, context=None):
res = super(ir_cron, self).unlink(cr, uid, ids, context=context)
cr.commit()
self.cancel(cr.dbname)
self._poolJobs(cr.dbname)
return res
ir_cron()