[7.0] email_from in email templates ignored

Asked by electro

As is in the related bug (https://bugs.launchpad.net/openobject-addons/+bug/1171505) but here I'm talking about email_from field

When sending an email from the system using a template with a fixed From email address, this settings is ignored and the email_from used is always alias of current user and not the email address or field specified in the template.

to find this you can
1) change email template for sale order and file email_from field with some fiexed email
2) send a sale sale order by email to some of your addresses using previous modified template

You should recevive the sale order where sender is the address you had specified in the template but you will receive by yourself opener alias.

I've prepared a workaroud that's is working for me :

in email_template/wizard/mail_compose_message.py: Add email_from to filter list
in mail/mail_followers.py : change sender selection order
in mail/wizard/mail_compose_message.py: add email_from field from wizard.email_from
in mail/wizard/mail_compose_message_view.xml: add email_from field

This is not so nice solution because it will shows sender field always also for standard messaging view, may be changes should be done on some other view (template ?) anyway it's wath I can do now
regards

Question information

Language:
English Edit question
Status:
Expired
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1193283.

Revision history for this message
Amit Parik (amit-parik) said :
#1

Hello Electro,

I have checked this issue on deep. The problem is comes from the email rendering, you have to just install python-jinja2 packages at your server. Then it will work fine.
Open the terminal and install the following package.

sudo apt-get install python-jinja2 (for ubuntu)
yum install python-jinja2 (for centOS)

Thank you!

Revision history for this message
PkLab.net (pklab) said :
#2

Hi,
Sorry for my crossposting due to a mistake about bug and aswer :(

I'm having the same problem too and I've Package python-jinja2 already installed and latest version on centos.

For example if I send a quotation by email, than "Sales Order - Send by Email" template is used by default.

In this default template I've replaced default From Field "${object.user_id.email or ''}" with a fixed email addr like "<email address hidden>".

While I'm expecting to receive quotation from "<email address hidden>" I still receiving from the alias of the openerp user that has sent the quotation: object.user_id.email.

This also for reply-to field
This also after openerp restart.

thank you

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.