[IMP]: base_action_rule: Improved query to get only active rules
bzr revid: rpa@tinyerp.com-20100706134805-pnlo2ry5fjs31sj7
This commit is contained in:
parent
1d9cbd3aae
commit
8985969fba
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue