openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #05163
[Bug 918073] [NEW] [6.0] base_action_rule - mandatory "Email from" is not intuitive in view
Public bug reported:
Hello,
In base action rule form view, nothing shows that if you want your mails
to be sent you absolutely needs to set "Email From" (user could think
there is some default value)
Please change the view in a more explicit way.
Either add a check box "send email" that will set act_from_email field to mandatory plus (de)activate the sending mail option.
Or add some understandable explaination in tool tips.
In the code :
if len(emails) and action.act_mail_body:
emails = list(set(emails))
from_email= tools.ustr(action.act_email_from)
##### Here we get the act_email_from
try:
from_email= safe_eval(tools.ustr(action.act_email_from), {}, locals_for_emails)
except:
pass
email_from = from_email
def to_email(text):
return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
emails = to_email(','.join(filter(None, emails)))
##### here we format it
email_froms = to_email(email_from)
##### here we check if it is set (but nothing is said in view)
if email_froms:
self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/918073
Title:
[6.0] base_action_rule - mandatory "Email from" is not intuitive in
view
Status in OpenERP Addons (modules):
New
Bug description:
Hello,
In base action rule form view, nothing shows that if you want your
mails to be sent you absolutely needs to set "Email From" (user could
think there is some default value)
Please change the view in a more explicit way.
Either add a check box "send email" that will set act_from_email field to mandatory plus (de)activate the sending mail option.
Or add some understandable explaination in tool tips.
In the code :
if len(emails) and action.act_mail_body:
emails = list(set(emails))
from_email= tools.ustr(action.act_email_from)
##### Here we get the act_email_from
try:
from_email= safe_eval(tools.ustr(action.act_email_from), {}, locals_for_emails)
except:
pass
email_from = from_email
def to_email(text):
return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
emails = to_email(','.join(filter(None, emails)))
##### here we format it
email_froms = to_email(email_from)
##### here we check if it is set (but nothing is said in view)
if email_froms:
self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/918073/+subscriptions
Follow ups
References