openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16787
[Bug 1021185] Re: 6.1 email_template when i make a html_template it don't work
I was trying to debug this bug with the limited knowledge of OpenERP I
have. Might be useful information for someone to fix.
To give a context, the variable mail.subtype controls whether the mail
should go out as plain text or html. The template when created, sets the
right value of mail.subtype ('html'). When you compose a mail using the
template in the wizard, the variable still has the right value (as
observed in debug view).
However, I debugged the send_mail function in
addons/mail/wizard/mail_compose_message.py, and it looks like the
mail.subtype element had been set to 'text' instead of 'html'. Somewhere
between clicking "Send Button" and the program control reaching
"send_mail", the value has been altered from 'html' to 'text'.
I am not sure what causes this change in variable value. My first
hypothesis was that the variable has been changed while creating a copy
of the mail object. I tried putting debug points in the copy functions
but without fail.
For now, I have just hacked the code to convert the value of
mail.subtype in code, but I am looking for cleaner solution.
--
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/1021185
Title:
6.1 email_template when i make a html_template it don't work
Status in OpenERP Addons (modules):
Confirmed
Bug description:
When i make a html-template and want to sent, for example from sale_order, it don't work.
The subtype that is always in the mail is plain and not html.
I have tested it on the current branch of openerp6.1.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1021185/+subscriptions
References