diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2010-07-06 19:18:05 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2010-07-06 19:18:05 +0530 |
| commit | 8985969fbaf604b7b37ea4e38f06ef3bf6b13f87 (patch) | |
| tree | 81234f239fc670ed080ea8a1df623aec50c9ec68 /addons | |
| parent | 1d9cbd3aae1654762192e66ff434a87108efb5f3 (diff) | |
[IMP]: base_action_rule: Improved query to get only active rules
bzr revid: rpa@tinyerp.com-20100706134805-pnlo2ry5fjs31sj7
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/base_action_rule/base_action_rule.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 4b7ea9d30da..776420eb360 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -127,7 +127,9 @@ the rule to mark CC(mail to any other person defined in actions)."), def pre_action(self, cr, uid, ids, model, context=None): # Searching for action rules - cr.execute("SELECT model.model, rule.id FROM base_action_rule rule LEFT JOIN ir_model model on (model.id = rule.name)") + cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \ + LEFT JOIN ir_model model on (model.id = rule.name) \ + where active") res = cr.fetchall() # Check if any rule matching with current object for obj_name, rule_id in res: |
