Since 953a693df link not corresponding to a route are tought multilang
by default.
Thus in the mass mailing, if the user had not the default language on
the website he would have eg. a /fr_FR/unsubscribe_from_list placeholder
in the mail.
The placeholder is replaced by a real link pinpointing to the items the
given person would unsubscribe to, but having /fr_FR/ part prevented
that.
With this PR, there is a dummy route so /unsubscribe_from_list is
explicitely known as not multilang.
opw-1850696
closes#24912
Co-authored-by: Goffin Simon <sig@odoo.com>
If the mass mailing was to mail contacts, this could cause an error if
the recipient unsubscribed. If the mass mailing was to mailing list,
unsubscribe would not work.
This change update unsubscribe to take into account changes in 765e752
and e15372c07 that allowed mailing list / mailing list contacts to be
used separately.
opw-770473
closes#20145
This commit removes the strange selection box based on a magic flag and
some strange methods returning a string. Instead just allow to send mass
mailing on all models inheriting from mail.thread using the is mail
thread flag.
Various addons are updated to remove the _mail_mass_mailing class
attribute used to determine mass mailing capability.
We consider people could send a mass mailing on every model inheriting
from mail.thread. It makes no sense to limit it to a given set of addons.
* StringIO removed from stdlib, replace with io
* try to correctly handle BytesIO/StringIO (one is for bytes the other
is for text)
* fix base64: Python 3 removed bytes-encoding and bytes-bytes
codecs (via #encode) so replace all calls to str.encode('base64'),
also b64encode is a bytes->bytes conversion so attempt to properly
handle that
issue #8530
Passlib's consteq() function only works when both values are
of the same type.
`_unsubscribe_token` uses hmac.hexdigest() which always returns
byte-strings, so we need to ensure that the token passed in GET
parameters is cast to byte-string too.
In addition, _unsubscribe_token() is expected to always derive
the same token for the same list, res_id and email. It already
takes care of ID passed as strings/int, but failed to make sure
that the email can be passed as a byte-string or unicode-string.
Forcing it to unicode before deriving the token takes care of that.
The mailing._unsubscribe_token() method expected the record ID
as an integer, but accepted strings and generated a different
token for the string representation of an integer (!)
The unsubscribe controller was passing a string by mistake.
mailing._unsubscribe_token will still expect integers but if
the string representation of an integer is passed it will be
silently cast to an integer, and will generate the same token.
For unknown reasons, commit bbca135410 removed the
import of "_" which was still used. This commit restores it, allowing
users to unsubscribe from mailing without crash.
- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
The unsubscribe URL is used within the `mass_mailing` module,
e.g. in `_get_unsubscribe_url` & `send_get_email_dict`.
Basically, there is the possibility to add the unsubscription
link in the mass mailings while having only
`mass_mailing` installed.
But, the unsubscription route is defined within
the module `website_mass_mailing`.
Therefore, if you added the unsubscription link
within your mailings while not having
`website_mass_mailing` installed, trying
to follow the unsubscription link leaded to
a `404 Not Found` page.
We therefore define the route within `mass_mailing`
directly, which does the basic stuff (the basic
unsubscribe and confirmation), and override this route
in `website_mass_mailing`, where the advanced stuff is done
(the mailing lists list unsubscription and the better
looking page).
opw-669425
geoip is set by the website module. If website is not installed,
request.session.geoip won't exist. Because all the geoip logic is in the
website module this means that if you don't install the website module
all of your tracked links will have an undefined country. This isn't
that big of an issue, because as far as I can tell the only default view
that displays this country is in website_links.
Ideally, the geoip should perhaps be moved to base, but for now this
will do.
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
This module tracks clicks in mass mailing mails and allow the generation of trackable links in a website interface.
Modules modifications
---------------------
Refractoring of the crm_tracking_* classes in a new module.
* Extract the crm_tracking_* from the crm module into a new module "utm"
* Remove the crm_mass_mailing bridge module
* New dependencies of mass_mailing and website_links to utm.
The old-api model._all_columns contains information about model._columns and
inherited columns. This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...
This commit contains the following changes:
- adapt several methods of BaseModel to use fields instead of columns and
_all_columns
- copy all semantic-free attributes of related fields from their source
- add attribute 'group_operator' on integer and float fields
- base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
payment_acquirer, share, website, website_crm, website_mail: simply use
_fields instead of _all_columns
- base, decimal_precision, website: adapt qweb rendering methods to use fields
instead of columns
- fixed subscription, was always subscribing to the last created list;
- slightly improved the snippet display, now displaying a 'thanks' when subscribed instead of just making everything disabled;
- removed unnecessary JS line
it is now possible to compute models allowing mass mailing using mass_mailing_campaign
module. This allows to completely remove the bridges modules, using a more generic
controller for unsubscription.
bzr revid: tde@openerp.com-20140416082851-8duo6yrwr5hwd8c2
first fradt of adding an unsubscribe link in the sent emails. Added a controller
managing this unsubscription. It is based on model, res_id and mailing_id, allowing
to find the customer / lead / contact; but the email is added in the link to
avoid allowing people unsubscribing random people using res_id generation.
bzr revid: tde@openerp.com-20140321172139-sak10zs2g31xj0t4
- fixed forgottent import of mail_thread in mass_mailing, to enable bounce and replied tracking
- fixed replied computation in message_route_process, adding the original email in parameters
- fixed form view of campaign, to add edit and dlete now that clicking on it redirects to the waves
- added track field on mail_mail, to avoid creating too mush entries in mail.mail.statistics
- fixed mass_mailign controller
bzr revid: tde@openerp.com-20130916114706-b9zyhp0ha6mr9fzg
Mail statistics are now stored onto a separated object (mail.mail.statistics), allowing to
handle emails separately from statistics (among other removing mail.mail entries while keeping
statistics).
Everything linnked to opened/replied/bounce is not managed by mass_mailing, removed added code
in mail module.
bzr revid: tde@openerp.com-20130913115408-322cyjipdg680as6