same_thread boolean field of mail.compose.message model define wether or not replies should be posted in the thread or not
On composer creation, this boolean should be passed according to the reply_to_mode of the mass_mailing
Otherwise, all replies would be posted in the thread, and the reply_to will be ignored (if same_thread id True, reply_to is poped from the mails values, mail/wizard/mail_compose_message.py:284)
- mail.compose.message: in render_message_batch, compute defaults recipients
for the composer (method called for mass mailing only). This way values are
available for inheriting models.
bzr revid: tde@openerp.com-20140325135347-9v7u4uokffy7ud43
cleaning in get_record_data + code cleaning in get_mail_values + management
of the previously introduced method get_default_recipients, to be sure that
in mass mailing an email is effectively sent to a customer / lead / applicant
/ ... because with an ill-configured template, you could have mass amiling
mailing nobody.
bzr revid: tde@openerp.com-20140321171723-7e3lk64knojf09at
to remove unnecessary code.
post and filter_id fields have been removed as they are not necessary.
Updated tests accordingly to new mass mailing tests: mass mailing create
emails, no message_post anymore using followers.
bzr revid: tde@openerp.com-20140317115315-ws8dvjbiv5rspk43
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
main differences :
- record_name is not a function field anymore, but a char field + a method in create
if not given (default-like, but dependent of other values). This allows the composer
to give a value for record_name (False for email mass mailing) to avoid browsing
records and having their access rights issues in the way
- author_id, email_from coming from composer instead of called in every mail.message
creation
- moved code dealing with attachments from send_mail to get_mail-values, to that at
the end of this method we know all values of the email
Some tests have been updated / temporarily disabled.
bzr revid: tde@openerp.com-20140224132038-txdi0g30a7fzbnxp
- 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
Otherwiwse if same thread is checked and post not, the reply_to is forced to the user email to avoid the email to be regarded as private without having a parent mail (has the parent is not posted in the thread), which is not what is expected
bzr revid: dle@openerp.com-20140210092301-1bdyvdwgekwgo9rh
Post a copy in the document is False by default, and it does not make sense to replies in the document if the copy is not itself in the document.
Therefore, if post a copy in the document is false by default, replies in the document should be false too.
Moreover, reply_to is required in the form view if mass mailing mode and post a copy is false OR replies in the document is false
But, to avoid updating the view, in the send_mail python function, if no reply to is set and post a copy or replies is false, we set the from email as the reply_to email
bzr revid: dle@openerp.com-20140130102001-v4t8ig1sj3cpfy3b
we have to process attachments as well as attachment_ids in the values generated
by the composer and the optional template.
As this behavior is the same as the one already implemented for message_post, this
feature has been moved into its dedicated method to be called by message_post
or before calling mail_mail.create().
This also allows to have attachments in pure email mass mailing that are attached
to mail.message, not to mail.compose.message model. When unlinking those emails,
the attachments will be also removed, and not lost in the database anymore.
bzr revid: tde@openerp.com-20131126110942-h8p0d9sbjtk0hwlu
due to list view header being checked, display
an info in the mass mailing wizard to warn the
user he is about to mail all records matching
its search filter, not only the selected ids.
bzr revid: tde@openerp.com-20131017093830-cvxihr3zwohos9ol
It can be called directly from within the campaign form view, using a button.
It allows to easily create new segments and launch the composer.
bzr revid: tde@openerp.com-20130912100909-ofalececxn64a389
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
mail.compose.message wizard and messaage_process now check that the active model
has message_post defined. Otherwise using thread_model context key that is better
managed in message_post, it is possible to use mail_thread.message_post() with a
thread_model and thread_id that should not allow message_post otherwise.
Hint: look for backport into 7.0
bzr revid: tde@openerp.com-20130606123230-d7ql14yydzfrlc7h