diff options
| author | Olivier Dony <odo@openerp.com> | 2013-12-16 15:20:49 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2013-12-16 15:20:49 +0100 |
| commit | d08821442e47efd873eb167e68bfa145b2de3e6f (patch) | |
| tree | 3259039e87d3488662d240d712d6b225a1514548 | |
| parent | 0a3b4b7fb7100e2117b9de13ee77b6db22292b45 (diff) | |
[FIX] base_action_rule: upon update/create of an automated action in multiprocess mode, force registry reload
Short of signaling the other workers, the (new) automated
rule may be randomly ignored, depending on which worker
handles the request (until the workers all reload
their registries).
bzr revid: odo@openerp.com-20131216142049-xh9gxy5cir3p2i09
| -rw-r--r-- | addons/base_action_rule/base_action_rule.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index a73933ff0f2..3d45407cb0e 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -23,6 +23,7 @@ from datetime import datetime, timedelta import time import logging +import openerp from openerp import SUPERUSER_ID from openerp.osv import fields, osv from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT @@ -206,6 +207,7 @@ class base_action_rule(osv.osv): def create(self, cr, uid, vals, context=None): res_id = super(base_action_rule, self).create(cr, uid, vals, context=context) self._register_hook(cr, [res_id]) + openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname) return res_id def write(self, cr, uid, ids, vals, context=None): @@ -213,6 +215,7 @@ class base_action_rule(osv.osv): ids = [ids] super(base_action_rule, self).write(cr, uid, ids, vals, context=context) self._register_hook(cr, ids) + openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname) return True def onchange_model_id(self, cr, uid, ids, model_id, context=None): |
