_primary_email was an array to be able to use it directly in the
depends. Typically a 'depends' with a computed value (lambda) needs
an array. Otherwise, it will only take the first character of the
field name string.
By setting _primary_email as a string, the lambda should always get
an array. But it simplifies a lot the usage of the _primary_email.
also, having an array was confusing as we could think that more than
one field can be considered as the primary email. This is not the
goal hare. So having the _primary_email as a single string is more
'self describing'. Only one field should be the _primary_email.
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..
Task ID 1896677
Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.
That simplify also the comparaison to - and the searches on - the
blacklist.
Task ID 1896677
In this commit we rewrite a bit add_click in order to remove the inlined sudo
and ease inheritance and parameter management inside the method.
Access through controllers is sudo-ed as the main API method is now done
with current user access rights.
This commit is linked to task ID 1904277 and PR #28242.
In order to understand more easily the impact of an opt out
or a blacklisted contact on the interface, blacklist and
opt-out demo data are added.
Tests updated to only test mails on contacts created inside
the test environement and not with demo data.
Task ID 1892998
Closes PR #27674
Purpose is to have some basis performance counters when sending a mailing
on 100 records, with and without blacklist involved. It will serves as
reference when working on mass mailing performance improvements in future
tasks.
This commit is linked to task ID 1889703 and PR #27526.
When using only mass mailing two issues arise when trying to send mass
mailings containing links
* a link.tracker is created for each link to shorten; however rights are
given currently only in website_links for website designers and not to
marketing users that use mass mailing. This commit adds the rights for
link.tracker model to those people;
* a link.tracker.code is created to hold the shortened versions of the
links. As it is a technical model it is now done as superuser as rights
on link.tracked model has already been granted and adding rights on such
a technical model is not necessary;
A test is added that checks what is done with links when sending mass
mailings. It helped spotting the hereabove issue.
This commit is linked to task ID 1889703 and PR #27526.
Purpose of this commit is to use the newly introduced helper to create
test users in a quick way and reduce code duplication.
This commit is linked to task ID 1889703 and PR #27526.
Purpose of this commit is to move tests not completely specific to some
mass mailing models to test_mass_mailing. Purpose is to allow to write
more in-depth tests based on existing ones by using test models instead
of some standard odoo ones.
This commit is linked to task ID 1889703 and PR #27526.
Purpose of this commit is to use the newly introduced helper to create
test users in a quick way and reduce code duplication.
This commit is linked to task ID 1889703 and PR #27526.
Purpose of this commit is to use the newly introduced helper to create
test users in a quick way and reduce code duplication. A mail specific
helper tool function is defined based on the standard one defined in test
allowing to pass a custom context. It bypasses mailing features in order
to speedup the creation.
This commit is linked to task ID 1889703 and PR #27526.
Purpose of this commit is to add some tests linked to the blacklist mixin
itself, notably the computed fields and its search method.
This commit is related to task ID 33224 (original blacklist implementation
done for v12) and its PR #25966 as well as task ID 1889703 (tests and fixes)
and its PR #27330. Done with collaboration of @dbeguin.
Purpose of this commit is to enforce blacklist use and base mechanisms. This
commit may break on runbot as fixes will come after having introduced tests.
It notably add tests for a8ce59ce36.
This commit is related to task ID 33224 (original blacklist implementation
done for v12) and its PR #25966 as well as task ID 1889703 (tests and fixes)
and its PR #27330. Done with collaboration of @dbeguin.
Purpose of this commit is to add the skeleton of a module holding models and
tests for mass mailing. It is build on top of test_mail in order to use
data, models and parameters already defined in it. Moreover having a
separate module allow to define test models that will not bloat production
databases.
It will soon hold unit tests for blacklist mechanism. Future commits will
gradually move tests from mass mailing module and improve them.
This commit is related to task ID 33224 (original blacklist implementation
done for v12) and its PR #25966 as well as task ID 1889703 (tests and fixes)
and its PR #27330. Done with collaboration of @dbeguin.