Commit Graph
52 Commits
Author SHA1 Message Date
Christophe Simonis e7f0dffb6a [MERGE] forward port branch saas-15 up to c301122b5f 2018-06-05 15:10:45 +02:00
Christophe Simonis a002210d93 [MERGE] forward port branch 10.0 up to c25b68f324 2018-06-05 11:50:03 +02:00
Christophe Simonis bc8f5c5e42 [MERGE] forward port branch 9.0 up to 0046bf7292 2018-06-05 10:54:09 +02:00
Nicolas Martinelli b837bbdd8b [FIX] mass_mailing: unsubscribe if trailing '/'
If the `web.base.url` contains a trailing `/`, the replacement of the
`/unsubscribe_from_list` link won't work since the string to replace
will be `my_url//unsubscribe_from_list` instead of
`my_url/unsubscribe_from_list`.

Fixes #24731
opw-1848572
2018-06-05 08:35:50 +02:00
Christophe Simonis 3051d1dd2f [MERGE] forward port branch 9.0 up to 34f567dd39 2018-05-24 16:55:28 +02:00
Christophe Simonis 34f567dd39 Revert "[FIX] mass_mailing: unsubscribe not working in multi lang"
commit a3ab33f212 introduced invalid code
2018-05-24 16:50:09 +02:00
Christophe Simonis 299b613da3 [MERGE] forward port branch 9.0 up to 919a1af936 2018-05-24 16:31:23 +02:00
Goffin Simon a3ab33f212 [FIX] mass_mailing: unsubscribe not working in multi lang
When installing the website with a lang  different than the one set
on the user, the button unsubscribe in the mass mailing snippets
didn't work because the unsubscribe link contains the code of the
language. The function send_get_email_dict in model mail.mail didn't
expect this behavior and so couldn't set the right unsubscribe link
in the mail.

opw:1850696
2018-05-24 09:46:36 +02:00
Yannick Tivisse 736e850a8e [FIX] mass_mailing: Use werzeug.urls instead of urlparse
werkzeug.urls is used instead of urlparse since https://github.com/odoo/odoo/commit/01e35141479b8dfc4a390518f89fc52e7cec5396#diff-f72572eec7ff7bbeca23ba84eda9fc38L35

Error introduced by forwardport https://github.com/odoo/odoo/commit/ba294a397e6ee3eb7dd0153f0726a880f6b77459
2017-09-08 11:51:28 +02:00
Christophe Simonis fa3e89064a [MERGE] forward port branch saas-16 up to 104dfe3c07 2017-07-20 11:48:49 +02:00
Christophe Simonis b857fd4c90 [MERGE] forward port branch 10.0 up to 11270336fa 2017-07-19 16:21:12 +02:00
Christophe Simonis 044ab92270 [MERGE] forward port branch saas-11 up to f081f19fb8 2017-07-18 20:09:37 +02:00
Christophe Simonis ba294a397e [MERGE] forward port branch saas-6 up to 3228694bdd 2017-07-18 19:18:59 +02:00
Xavier Morel 01e3514147 [FIX] P3: urllib, urllib2 and urlparse
In Python 3, all of these were "consolidated" under urllib(.request,
.parse, .errors) which is inconvenient.

Since we already have hard dependencies on requests and
werkzeug(.urls, which is a backport of Python 3's unicode-aware
urllib.parse) migrate *everything* to that.

A sticking point is urllib2.URLError, those were (mostly) replaced by
the slightly more general IOError which URLError extends.
2017-05-15 12:26:30 +02:00
Christophe Simonis 13ad16104a [MERGE] forward port branch 10.0 up to 00e169c05a 2017-04-13 13:22:27 +02:00
Christophe Simonis 9e159ef204 [MERGE] forward port branch saas-11 up to f830c7c3e3 2017-04-12 18:51:16 +02:00
Jérome Maes b99311b0e9 [FIX] mass_mailing: use correct regex to detect href content
link_tracker use a regex to determine the content of
a 'href' tag, taking the 'mailto:xxxx@yyyy.zz' case
into account. mass_mailing use another regex that simply
don't.
So when sending a mass mailing containing email link,
the email will be appended by url path of tracking
url '/m/<stat_id>'.

This commit makes mass_mailing use the same regex as
link_tracker (which is in the dependencies of mass_mailing).

opw-727779
2017-04-07 15:52:13 +02:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Jairo Llopis 4d23595af5 [IMP] mass_mailing: add security token to unsubscription URL
Should prevent rogue unsubscriptions without making the
process more complicated for legit cases.

Closes #12040
2016-11-14 15:34:12 +01:00
Thibault Delavallée a32b3b220d [REF] mail: clean mail_mail postprocess method having v7 and v8 implementation
Old method postprocess_sent_message is removed. New api style method
introduced when migrating the module is now used.
2016-08-02 12:32:42 +02:00
Keyur Gajjar bbca135410 [MIG] mass_mailing: code migration to new api
NB: A controller in website_mass_mailing has been migrated too. It's not a real issue
as this module will also be migrated in the days to come
2016-06-17 11:23:12 +02:00
Martin Trigaux 136c563bc6 [FIX] mass_mailing: duplicated regex 2016-01-06 08:20:48 +01:00
Martin Trigaux 5ca043b86c [FIX] mail, purchase: forwardport
Missing parts, I only blame rerere
2016-01-06 08:11:45 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Martin Trigaux 955ed51687 [MERGE] Forwardport of branch 8.0 up to 6efc3712 2015-12-30 11:48:14 +01:00
Antonio Espinosa fc3c0b22f9 [FIX] mass_mailing: absolute URLs to email images
Partial backport of 9.0 commit a14f89c8 to 8.0
<base href=""> are not well supported in some webmails
Replace absolute URLs by full path appending the domain.

Closes #10062
2015-12-16 15:17:09 +01:00
Jonathan Nemry (ACSONE) 43482d2d1e [FIX] mass_mailing: translatable unsubscribe link
Display the unsubscribe link in the language of the user

Closes #9995, opw 659075
2015-12-10 14:30:18 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
Thibault Delavallée 938d368afc [FIX] mass_mailing: resending exception emails
When resending emails whose statistics are in exception, erase the exception date
from the statistics. Indeed what is important is that they have been sent. Moreover
the mailing statistics are wrong as you could have sent emails still considered
as in exception.
2015-11-18 15:00:28 +01:00
Denis Ledoux c8d6b36632 [MERGE] forward port of branch saas-6 up to a0c64bebe6 2015-10-28 12:01:30 +01:00
Nicolas Lempereur a14f89c866 [FIX] website_mail,mass_mailing: better support for outlook
This fix is about several issue of office oulook:

- a fixed table width must be in pixel, using 100% of parent div width
  doesn't work,

- a background-color on a div is not used, the background color should
  be on the table inside this div using the attribute "bgcolor",

- the only way to center a table is to have a `<center>` tag arround it,
  or have an element arround it with "text-align: center",

- having a background image doesn't seem to be possible.

The two first are straightforward, but for the third:

- in non-outlook: all the snippet are centered (since they all have
  "margin: auto" which is valid outside outlook),
- in outlook: only a small part of the snippet with text-align:center
  or `<center>` arround them are centered.

To escape a bigger code change, this commit unify the outlook
behaviour by having all of the snippet left aligned in outlook (they are
still middle centered in other application).

For the background image, we need a fallback bgcolor and thus we need to
have the background on the table element. There was also an issue
between relative and absolute url for gmail.

closes #9019
opw-650217
2015-10-13 16:11:18 +02:00
Christophe Simonis d750206c49 [MERGE] forward port of branch saas-6 up to e9f1ee4 2015-10-01 15:16:59 +02:00
Thibault Delavallée b28199a6d6 [FIX] mass_mailing: mix of old and new api 2015-09-30 11:31:20 +02:00
Nicolas Lempereur 09e9102605 [FIX] mass_mailing: outlook.com need absolute url
The `<base />` tag isn't handled by outlook.com, thus all relative link
to image fail to be shown.

This fix treat the most common case by using absolute url instead of
relative url.

related to opw-648463
2015-09-24 15:50:07 +02:00
Christophe Simonis 73e652818b [MERGE] forward port of branch saas-6 up to 8d95f6d 2015-08-15 16:57:35 +02:00
Christophe Simonis 171d001985 [MERGE] forward port of branch 8.0 up to 02954ba 2015-08-11 16:56:47 +02:00
Denis Ledoux 0d3a9c47e7 [FIX] mass_mailing: use werkzeug url_encode instead of urllib urlencode
As Werkzeug support UTF-8 unicoding, while urllib doesn't
2015-08-11 13:05:41 +02:00
Thibault Delavallée de27deba9b [MOVE] mass_mailing, portal_sale, purchase, website_mail_group: move code
related to the mail.mail model in their own mail_mail.py file. This ease
the process of working on the mail.mail model and inheritance, if the
code is not hidden between unrelated models.
2015-07-02 13:33:59 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Thibault Delavallée 4b122ad41d [MIGR] mail: migration to the new API 2015-04-27 10:36:15 +02:00
Christophe Matthieu e2f19f0ed5 [IMP] Unsubscribe links in themes 2015-02-12 11:58:13 +01:00
Julien De Coster d88c34d11e [IMP] Mass mailings send in cron
1. The merge of the "email_template" module into the "mail" module.
2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view.
3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing).
4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail.
5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign.
6. Many little improvements
2015-01-07 18:01:58 +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
Martin Trigaux fa44bdb486 [FIX] mass_mailing: load images in emails
The emails containing emails generated with the image widget have absolute path (src='/website/static/...'), adding <base> tag allows the mail client to load it correctly.
2014-07-09 16:42:22 +02:00
Thibault Delavallée 0ce1ecd6db [FIX] mass_mailing: various fixes 2014-06-18 11:10:31 +02:00
Thibault Delavallée c5627c4d3f [FIX] mass_mailing: fixed issue when generating unsubscirbe urlé
bzr revid: tde@openerp.com-20140415160743-5i0pjieo4o031ico
2014-04-15 18:07:43 +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 58e53d2e31 [IMP] mass_mailing: form view improvements using stat button + failed tracking
on statistics. This comes with a web branch to fixes the statbuttons.

bzr revid: tde@openerp.com-20140408113029-ezjlbzbn3j26f43w
2014-04-08 13:30:29 +02:00
Thibault Delavallée d7db8a22f6 [IMP] mass_mailing: trackign url: add database name in parameters
bzr revid: tde@openerp.com-20140328132052-oktsqtpmaez8wax6
2014-03-28 14:20:52 +01:00
Thibault Delavallée a581d864a2 [IMP] mass_mailing: improved test send / send to all
- now workign on various models, taking the correct recipient (email, partner_id for partner or lead)
- improved test send: use email_to, now a many2many on contact model to ease the use of templates
- added action to create a mailing list from leads
- moved a res.partner dedicated action to its own file
- added an actoin to create a mailing list from contacts
- fixed mail_mail post_process: use mail_sent variable as mail.state is not available

bzr revid: tde@openerp.com-20140318164117-f2aou25u633j8m57
2014-03-18 17:41:17 +01:00