diff options
| author | qdp-launchpad@tinyerp.com <> | 2010-06-25 15:41:09 +0200 |
|---|---|---|
| committer | qdp-launchpad@tinyerp.com <> | 2010-06-25 15:41:09 +0200 |
| commit | 75cd7834c59be91ea8c8725d95db63052257d8a2 (patch) | |
| tree | 3d6bb9d9ff7117b5c027cb8d4d68a18264627a6c | |
| parent | f5a6adca75121226c34767ea5512dbb52968df44 (diff) | |
[FIX] base_action_rule: a condition that is triggered by a button return False if a button isn't pushed
bzr revid: qdp-launchpad@tinyerp.com-20100625134109-nxj529sqzn80u2yq
| -rw-r--r-- | addons/base_action_rule/base_action_rule.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 8b9e6f700e8..405c3155619 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -233,7 +233,6 @@ the rule to mark CC(mail to any other person defined in actions)."), @param email: pass the emails @param emailfrom: Pass name the email From else False @param context: A standard dictionary for contextual values """ - body = self.format_mail(obj, body) if not emailfrom: if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and\ @@ -255,8 +254,7 @@ the rule to mark CC(mail to any other person defined in actions)."), @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param context: A standard dictionary for contextual values """ - - ok = True + ok = True if eval(action.domain): obj_ids = obj._table.search(cr, uid, eval(action.domain), context=context) if not obj.id in obj_ids: @@ -277,7 +275,8 @@ the rule to mark CC(mail to any other person defined in actions)."), ok = ok and (not action.trg_state_from or action.trg_state_from==obj.state) if state_to: ok = ok and (not action.trg_state_to or action.trg_state_to==state_to) - + elif action.trg_state_to: + ok = False reg_name = action.regex_name result_name = True if reg_name: |
