Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-6122-skh into 
lp:openobject-addons/6.0.

Requested reviews:
  Priyesh (Open ERP) (pso-openerp)
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-6122-skh/+merge/63996

Helo Sir,

[Fix]: There is Issue in the Automated Action. When the Emails are provided in 
the "Email Action" tab without string,eg: [email protected] inplace of 
"[email protected]". It raises an TypeError/SyntaxError: invalid syntax.

I have fixed the issue in this branch.

Thanks
skh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-6122-skh/+merge/63996
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-6122-skh.
=== modified file 'base_action_rule/base_action_rule.py'
--- base_action_rule/base_action_rule.py	2011-02-01 06:42:45 +0000
+++ base_action_rule/base_action_rule.py	2011-06-09 11:52:07 +0000
@@ -418,12 +418,22 @@
         }
 
         if action.act_email_to:
-            emails.append(safe_eval(action.act_email_to, {}, locals_for_emails))
+            email_to = str(action.act_email_to)
+            try:
+                email_to = eval(str(action.act_email_to, {}, locals_for_emails))
+            except:
+                pass
+            emails.append(email_to)
 
         emails = filter(None, emails)
         if len(emails) and action.act_mail_body:
             emails = list(set(emails))
-            email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
+            from_email= str(action.act_email_from)
+            try:
+                from_email= safe_eval(str(action.act_email_from), {}, locals_for_emails)
+            except:
+                pass    
+            email_from = from_email
 
             def to_email(text):
                 return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to