From d1c5aa79d54ca78f1fd5ca734b924034bf2264e0 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 11 Jun 2015 09:45:45 +0200 Subject: [PATCH] [FIX] project: active_test When a project is duplicated, the disabled automated actions don't have to be applied. opw:642129 --- addons/base_action_rule/base_action_rule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 7bcfb8928f4..6449b8e0ce2 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -181,7 +181,7 @@ class base_action_rule(osv.osv): action_model = self.pool.get('base.action.rule') action_dom = [('model', '=', self._name), ('kind', 'in', ['on_create', 'on_create_or_write'])] - action_ids = action_model.search(cr, uid, action_dom, context=context) + action_ids = action_model.search(cr, uid, action_dom, context=dict(context, active_test=True)) # check postconditions, and execute actions on the records that satisfy them for action in action_model.browse(cr, uid, action_ids, context=context): @@ -295,7 +295,7 @@ class base_action_rule(osv.osv): context = context or {} # retrieve all the action rules to run based on a timed condition action_dom = [('kind', '=', 'on_time')] - action_ids = self.search(cr, uid, action_dom, context=context) + action_ids = self.search(cr, uid, action_dom, context=dict(context, active_test=True)) for action in self.browse(cr, uid, action_ids, context=context): now = datetime.now() if action.last_run: