When sending a message with the "Compose new message" button on the right of the user menu, in the top bar, if you tried to save the message as template, you had a traceback because model field of email.template is mandatory, but was set to True because there is no model in such a case.
As there is no any relevant model in such a place, and that the field is mandatory, mail.message is pretty convenient as the default value.
Fields of html type are already escaped in database and the method
`append_content_to_html` defaults the argument `plaintext` to True,
then calls `plaintext2html` if this argument is True, resulting in
the html signature being escaped twice.
This was added as a security check, but access to this field is need by the wizard itself.
As non employee users can't read/create email templates, this will not be problematic
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
a template, display the user's signature if asked by the template. The use will
then be able to modify the generated content and to remove / update it if necessary;
Otherwise the signature is not added in mass mailing mode, because the content
of the email is based on the wizard's body, not the template one.
Some rewriting in the onchange: now using a browse instead of a read.
bzr revid: tde@openerp.com-20140423152926-sno0gk8lup9l442p
- usability improveemnts on the sample document, more clear
- add partner_ids fields, displaying result of email template rendering that now also
generated partner_ids that will be recipient_ids on a mail_mail
- added attachment display
bzr revid: tde@openerp.com-20140327141241-2w2lxj5hkq8nqcu5
recipients instead of using template-based values. This should be the default way of using
templates actually, to avoid confusion with mako, ill-defined templates, ...
email_template code has been updated to handle recipient_ids when creating an email, depending
on its generated template values or default recipients.
mail_compose_message has also been updated, delegating the calculation of recipient when
having a template to the template itself, using some context keys to force the use
of partners instead of email_to and email_cc.
Also updated email_template form view to be a bit less confusing.
bzr revid: tde@openerp.com-20140325140324-bljvybigk3zv5ugm
Local URLs are converted into absolute URLs, notably because when using the
email designer, images are added using local URLs. Previously to this fix
the template was analyzed to find local URLs and make them absolute.
However this causes 2 issues :
- mako-based URLs are broken because a scheme is added before the mako that
generated the image src
- when changing the base url, the templates are not updated
The URLs are now converted dynamically when generating the content of the
html. This is done by passing a new parameter that enable the post processing
of the generated content.
Also fixed double body generation when using templates; fields parameter
was not propagated correctly.
bzr revid: tde@openerp.com-20140304112957-l9b10gyjqphs5fgc
- fixed composer using template that were rendering the body twice, once form the template and
once from the composer body. Only the latter one is used, so avoid generating the template body
that is not necessary
- fixed email_template generating values for a set of given fields, ignoring the field list
given into parameter
- fixed post processing of templates to transform local urls into absolute urls; now urls are
transformed after body generation, when sending email based on templates , or when generating
the content when using the composer.
bzr revid: tde@openerp.com-20140227153835-gmqnxrzed9fnbxhm
- now differentiates mass mailing and mass post.
- mass mailing is a true mass mailing
- using same_thread log a copy in the document, without using message_post
(using notification field, + model and res_id)
- improved form view of composer, adding a filed explaining a bit the various
recipients
- removed unnecessary fields coming from the template (partner_to, ...) because
they are confusing -> composer should be easier to understand and use
- removed some unnecessary code
- removed double body computation when using templates (one for tmeplate, then
the wizard -> not necessary)
This commit will be followed by other to try to improve the mass mailing
and mass post.
bzr revid: tde@openerp.com-20140220152945-ash0hfkzevzamihq
Also refactored send_mail in mail.compose.message in order to be able to override
mail values without having to intefere with the send_mail behavior.
bzr revid: tde@openerp.com-20130828140929-xe9hbmbo6jxgs9mh