From 5fc14722bb900337a6e7dfdcf0863246df50054a Mon Sep 17 00:00:00 2001 From: "Daniel Watkins (credativ)" Date: Thu, 9 Sep 2010 15:28:41 +0100 Subject: [PATCH] Don't run timed actions if we don't have a time base. bzr revid: daniel.watkins@credativ.co.uk-20100909142841-ntwee472cqr50t0i --- 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 630cfca7e49..cc7308dbc43 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -253,8 +253,8 @@ the rule to mark CC(mail to any other person defined in actions)."), base = get_datetime(base) delay = fnct[rule.trg_date_range_type](rule.trg_date_range) action_date = base + delay - if (not last_run or (last_run <= action_date < now)): - self._action(cr, uid, [rule.id], [obj], context=context) + if (not last_run or (last_run <= action_date < now)): + self._action(cr, uid, [rule.id], [obj], context=context) rule_pool.write(cr, uid, [rule.id], {'last_run': now}, context=context)