From 6231427f0a14c2ac25836318ee32e17b5b5a8d59 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 4 Aug 2014 12:14:11 +0200 Subject: [PATCH] [FIX] procurement: missing variable scheduler_cron_id was not initialised so the scheduler always crashed (with just info message) --- addons/procurement/wizard/schedulers_all.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/procurement/wizard/schedulers_all.py b/addons/procurement/wizard/schedulers_all.py index 5d05291c546..1f5ed8f1a28 100644 --- a/addons/procurement/wizard/schedulers_all.py +++ b/addons/procurement/wizard/schedulers_all.py @@ -21,6 +21,7 @@ import logging import threading +from openerp import SUPERUSER_ID from openerp import tools from openerp.osv import osv @@ -45,6 +46,7 @@ class procurement_compute_all(osv.osv_memory): #As this function is in a new thread, i need to open a new cursor, because the old one may be closed new_cr = self.pool.cursor() + scheduler_cron_id = self.pool['ir.model.data'].get_object_reference(new_cr, SUPERUSER_ID, 'procurement', 'ir_cron_scheduler_action')[1] # Avoid to run the scheduler multiple times in the same time try: with tools.mute_logger('openerp.sql_db'):