Commit Graph

207 Commits

Author SHA1 Message Date
Christophe Simonis 327e471c9b [MERGE] forward port of branch saas-3 up to b62ee07 2015-05-21 14:19:24 +02:00
Christophe Simonis b62ee0734c [MERGE] forward port of branch 7.0 up to eaaca65 2015-05-21 14:11:39 +02:00
Nicolas Martinelli eaaca65594 [FIX] mail: does not write "False" if mail body is empty
opw-640309
2015-05-21 12:22:50 +02:00
David Monjoie 8be3cabf8a [FIX] mail: fixed notes logging using mail wizard
Seems like the wizard was still looking for the old js context hack from before d5a8905 instead of testing against the new field
2015-01-19 10:43:31 +01:00
Denis Ledoux 2592f149a0 [FIX] mail: model can be None or uninstalled
This is related to rev. 83b28737e9
2014-12-02 16:50:45 +01:00
Denis Ledoux 83b28737e9 [FIX] mail: no_auto_thread default True if the model has no mail.thread 2014-12-02 16:06:51 +01:00
Denis Ledoux 6061ccda54 [FIX] mail: batch_size expects an integer 2014-11-24 16:42:26 +01:00
Denis Ledoux bbd20dbbc5 [FIX] mail: allow to set own batch size for mass mailing 2014-11-24 16:38:12 +01:00
Thibault Delavallée c64b077362 [FIX] mail: fixed bounce email recognition + invite email headers + mass mailing statistics not lost anymore
- [FIX] bounce regex: too many emails were considered as bounce and therefore
not displayed in the chatter and lost for the communication history. The regex
was not correctly looking for the bounce alias in the email_to.
- [FIX] invite email: replying to the invitation email (invitation as new
follower) now replies to the user sending the invitation.
- [FIX] mass_mailing: added a column to store the id of the original email
in addition to the many2one column. The many2one is set to null when deleting
the original email. As the information is necessary, it is saved on another
field. The many2one is necessary for indexes purpose as the inverse of
a one2many.
2014-08-11 15:39:26 +02:00
Thibault Delavallée 0c462a12b9 [FIX] mail: compose wizard: fixed default_get overrides not correctly managing the received field_list + improved custom call to default_get to correctly manage its in and out values. 2014-08-07 08:54:10 +02:00
Thibault Delavallée 7f0353974d [REF] mail: same_thread field changed into no_auto_thread, its contrary, to avoid migration issues (adding a 'always False' column is easier than an 'always True'). 2014-08-04 14:46:47 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
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
2014-07-06 17:05:41 +02:00
Thibault Delavallée 719a4f02c9 [REF] mail, crm, hr_recruitment, project, project_issue: simplified reply-to of notification emails (now displaying 'YourCompany -docname- <email>' instead of 'Followers of ...'; added same_thread directly on the mail.message model to ease the reply_to and message-id computation; factorized a bit the reply-to generation for a batch of records; udpated tests accordingly. 2014-06-23 10:47:47 +02:00
Thibault Delavallée 0ce1ecd6db [FIX] mass_mailing: various fixes 2014-06-18 11:10:31 +02:00
Denis Ledoux da231e909a [FIX] mail: commited pudb ... its late and it has been a while since the last time : ). 2014-06-01 22:10:54 +02:00
Denis Ledoux dd36a0e509 [FIX] mass_mailing: on mass mailing sending, set same_thread for message composer
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)
2014-06-01 22:08:56 +02:00
Denis Ledoux 97c0dbcd0a [FIX] mail: do not link email to a model/res_id if this model doesn't support new message 2014-06-01 21:27:55 +02:00
Martin Trigaux 1ab962d338 [FIX] mail: convert attachments to binary as it is the expected format of message_post opw 604205
The double convertion (render_message and send_mail) is done to keep the API but should be changed in next version.

bzr revid: mat@openerp.com-20140415161441-q6pfueetvv0namgw
2014-04-15 18:14:41 +02:00
Thibault Delavallée 3eaeae55a0 [IMP] mail, mass_mailing: better recipientsz computation
for mass mailing, composer and template. This allows to have one method computing recipints
and avoid repetiting myself.

bzr revid: tde@openerp.com-20140415154700-zu2izvxfjq1k4h4a
2014-04-15 17:47:00 +02:00
Thibault Delavallée 98472d8253 [CLEAN] Removed commented print
bzr revid: tde@openerp.com-20140415144943-ov6g4n9tzjxtwlk9
2014-04-15 16:49:43 +02:00
Thibault Delavallée 55fc583f36 [REM] mail: compose message: removed unnecessary code
bzr revid: tde@openerp.com-20140415143343-on2d3j92o6zifq59
2014-04-15 16:33:43 +02:00
Thibault Delavallée 73bebb6563 [IMP] mail: default recipients management
- 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
2014-03-25 14:53:47 +01:00
Thibault Delavallée 79cb083a62 [IMP] mail: mail_compose_message: some code
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
2014-03-21 18:17:23 +01:00
Thibault Delavallée 43cc054048 [FIX] mail_compose_message: create Re subject only when having a parent
bzr revid: tde@openerp.com-20140317132227-mcey6ywjr1g6pe9g
2014-03-17 14:22:27 +01:00
Thibault Delavallée d5a8905941 [IMP] mail_compose_message: added is_log boolean field for internal notes; + removed context hack that
did the same thing. Fixed composer form view: internal note, only subject + body is
displayed.

bzr revid: tde@openerp.com-20140317122409-5fd5d5uwc35oq0hb
2014-03-17 13:24:09 +01:00
Thibault Delavallée 48deceb6c6 [IMP] [REF] mail_compose_message: slightly cleaned wizard code to lessen the number of corner cases and
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
2014-03-17 12:53:15 +01:00
Thibault Delavallée 48098b5df1 [IMP] mail.compose.message: removed unnecessary code, email_from is already corretly managed
bzr revid: tde@openerp.com-20140314174827-nent5v02s2v2y2n0
2014-03-14 18:48:27 +01:00
Thibault Delavallée e6f6960d17 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140314162124-fn8f9ne80skha19h
2014-03-14 17:21:24 +01:00
Thibault Delavallée db2bdee343 MERGE] [FIX] email_template: fix relative -> absolute url conversion
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
2014-03-04 12:29:57 +01:00
Thibault Delavallée dd99c96ca2 [CLEAN] mail: some code cleaning in the modifications
bzr revid: tde@openerp.com-20140224142236-l61eqddc4vq9y861
2014-02-24 15:22:36 +01:00
Thibault Delavallée 4739eb138b [IMP] mail, email_template: still continuing work to improve performances of mass mailing.
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
2014-02-24 14:20:38 +01:00
Thibault Delavallée 4a284821b4 [MERGE] Sync with trunnk
bzr revid: tde@openerp.com-20140221145716-vkusdgd56rnc85rl
2014-02-21 15:57:16 +01:00
Thibault Delavallée 1ac8e7cdfd [IMP] mail, email_template: mass mailing feature cleaning
- 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
2014-02-20 16:29:45 +01:00
Denis Ledoux bd0f05690c [FIX] mail: do no pop reply_to if same thread or post in the document is false
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
2014-02-10 10:23:01 +01:00
Denis Ledoux 7cb8207006 [FIX] mail: same_thread back to True by default, otherwise this is not anymore possible to send email in non mass mailing. Same thread should be changed to False in trunk release
bzr revid: dle@openerp.com-20140130144442-qmbci74sdznod4k3
2014-01-30 15:44:42 +01:00
Denis Ledoux 2326d26bc7 [FIX] mail: for mass mailing, replies in document False by default
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
2014-01-30 11:20:01 +01:00
Denis Ledoux e10270d153 [FIX] mail: traceback when mass mailing with several partners and removing default template (or any template without reply_to)
bzr revid: dle@openerp.com-20140125102840-7z2w2na7pmy2kda0
2014-01-25 11:28:40 +01:00
Thibault Delavallée 4468d52283 [DOC] mail: cleaned a comment
bzr revid: tde@openerp.com-20131126121649-nywrh4hc1mcpwleh
2013-11-26 13:16:49 +01:00
Thibault Delavallée 974675bcbf [FIX] mail: attachments encoding issue: posting process
waits not encoded attachments: email_template encodes them. So de-encoding
is necessary.

bzr revid: tde@openerp.com-20131126120336-5lcp9ii7z9lru5vr
2013-11-26 13:03:36 +01:00
Thibault Delavallée cf214ed724 [FIX] mail: when generating pure email mass mailing
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
2013-11-26 12:09:42 +01:00
Thibault Delavallée 41ca7536e0 [FIX] mail: when performing pure email mass mailing
attachments were not formatted as a m2m command but a list
of ids. This is now fixed.

bzr revid: tde@openerp.com-20131126095632-txuy00xc1cmqjqcn
2013-11-26 10:56:32 +01:00
Thibault Delavallée f8922d6b16 [IMP] [ADD] mass_mailing: added a wizard to create new segments.
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
2013-09-12 12:09:09 +02:00
Thibault Delavallée c063f54691 [IMP] mail: in mass mail mode, default value is now to send emails, not to perform a mass post on documents.
bzr revid: tde@openerp.com-20130910124754-jssus6l43nil4qad
2013-09-10 14:47:54 +02:00
Thibault Delavallée 38e75127d9 [MERGE] Syn with trunk
bzr revid: tde@openerp.com-20130906081534-n273weq3h1fvfh2b
2013-09-06 10:15:34 +02:00
Thibault Delavallée 9ef46123a6 [IMP] mail.compose.message, email.template: rendering is now done in batch.
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
2013-08-28 16:09:29 +02:00
Atul Patel (OpenERP) 1a382f268c [MERGE]: Merged with addons
bzr revid: atp@tinyerp.com-20130812043810-y14dmqwvuxrxkuag
2013-08-12 10:08:10 +05:30
Thibault Delavallée fa7fc1277b [FIX] mail_compose_message: keep empty domains
bzr revid: tde@openerp.com-20130726104342-8o5s2k85d7sjuwoy
2013-07-26 12:43:42 +02:00
Thibault Delavallée 91ef7de709 [IMP] mail: better implementation of active domain / use active domain
bzr revid: tde@openerp.com-20130725135029-mx946vaibvz1rzii
2013-07-25 15:50:29 +02:00
Atul Patel (OpenERP) 7810f03c56 [REM]: Remove unused space
bzr revid: atp@tinyerp.com-20130725073354-uq3b2r0io1wsbdku
2013-07-25 13:03:54 +05:30
Atul Patel (OpenERP) 2706328ca4 [IMP] mail: Pass current user partner id into datasets and get it into template. add author also for private mail.
bzr revid: atp@tinyerp.com-20130725071939-9lmuhfgte987nu03
2013-07-25 12:49:39 +05:30