Rev. c9e38cae9f made the html sanitizer
stricter, and it will not badly break any attempt at composing
a good-looking mail template.
It will also strip all data-* attributes due to the default
`strict` mode, so any theme/snippets used in the template
will be dropped/crippled after saving.
mass-mailing templates are strictly meant for composing
outbound messages, and never displayed directly in users' Inbox
or published on the website. So there does not seem to be any
strict necessity to sanitize them.
When deleting the resource associated to a mail statistic,
e.g. deleting the lead associated to a statistic,
the statistic could not longer be opened.
opw-656738
_mail_mass_mailing attribute is evaluated at server launch (with no context) so
the attribute is never translated.
Create a new method in mail_thread to translate again the term at evaluation but
with a correct context.
Thanks to the _(...) in the attribute definition, the proper term is exported
and present in .pot file.
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
By default, when changing the recipients type of a
mass-mailing to partners or leads,
the selected records included the opt-out records.
To be consistent, as:
- `opt-out` records are excluded by default for mass mailing contacts
- the filter excluding the opt-out records
`Available for mass-mailing` is loaded by default
when changing the selection in the selection list dialog
The domain for partners and leads should exclude
opt-out records by default.
opw-658391
- Remove _inherit = ['utm.mixin'] on some reports and models. It make no sense
to set campaign_id, source_id or medium_id on reports according to the
cookies.
- Add an inheritS on the source_id in the mass_mailing model. Naturally, the
source_id name is the mass_mailing name.
- The medium is hardcoded as beeing 'Email', which is rather easy to understand
- Remove the 'Tracking' tab on the mass_mailing view.
We do not want to set the medium,campaign or the source automatically
from the cookies on reports, or on mass_mailing creation.
There was a misunderstanding in the model implementation for campaigns.
The inheritS was handled in a strange way while redefining the name field,
and creating the utm campaign_id field in an onchange.
A stable commit has been given in saas-6, while this one will remove the onchange in saas-7
What's done:
- Remove the required name field
- Set campaign_id as name with the _rec_name property
- Remove the onchange on the model and the view
- Everything will be handled thanks to the inheritS mechanism
Due to the change in 2many input / output the domain to apply the mailing was
not computed correctly. Indeed the onchange was waiting for a list of ids or
a 6, _, ids command, aka things that were send by 2many before some cleaning.
It has been adapted to the 4 command, now sent by the new onchange mechanism.
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.
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
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
`False` is not syntax valid for a domain.
It leads to errors when trying to evaluate `False`
as a domain in the evaluation of `pyeval.js`.
Therefore, using `False` as default value for `mailing_domain`
isn't correct
opw-648857
Should not be necessary for the correct working of odoo (normal cron
lookup & processing is performed using raw SQL anyway).
* fixed a few ref calls just in case
* also cleaned up a few unused imports