Odoo's Mergebot 2b609e7b64 [MERGE][IMP] mass_mailing: improve logging, fix assets, cleanup code bits
PURPOSE

Fix assets in mass mailing (unsubscription page is broken and assets usage is
a complete mess). Improve blocklist logging. Update tools methods, controllers
and templates naming to ease future improvements and refactoring.

SPECIFICATIONS

[FIX] mass_mailing: use frontend assets in subscription page

Unsubscribe page uses a custom layout allowing a portal-like behavior for
mass mailing without any link to website or portal. However it currently
uses the complete backend assets. This leads to a lot of unnecessary css
and js being loaded.

When having frontend pages like the one used in mass mailing it should rely
on frontend assets with some custom assets if necessary for the page to
be correctly displayed.

In this commit we choose to use frontend assets like other portal-like pages.
Mailing layout now uses the frontend layout defined in web and adds its own
subset of assets (mailing_assets). Some custom css is moved or added as well
as few tweaks to ensure layouting is globally the same as before this commit.

[IMP] mail, phone_validation: allow to log a message when (un)blacklisting

Add possibility to add a message when adding or removing a blacklist entry
for both mail and phone_validation (used for SMS). This replaces the
``action_remove_with_reason`` method.

When updating active flag this is added as a tracking note to avoid having
several messages. Indeed message is concatenated with the tracking itself
instead of adding message for tracking + a message for the log itself. When
a new record is created, a note is logged.

Use it in mass mailing.

[REF] mass_mailing: rename templates and controller methods

Rename templates to better understand their purpose. Current naming is not
crystal clear.

Rename controller methods in order to be clearer and more aligned with current
guidelines. Notably namespace by mailing, try to be clearer about their
purpose, ...

Add a helper field to know when a mailing runs on mailing lists as it triggers
some specific behavior.

In this commit we rename methods generating tokens (for recipients and report
management). Otherwise it is hard to distinguish them as naming is not really
convenient to use

  * _unsubscribe_token -> was actually generating token for a given recipient
    on a given mailing;
  * _get_unsubscribe_token -> was actually generating token for mailing
    users to deactivate D+1 KPI reporting;

Hash for mail tracking is also moved in its own method to avoid having the
same code twice. Better delegate it to a tool sub method.

Rename main routes, and keep a legacy for the main unsubscribe route to
keep retro compatibility for existing mailings.

[IMP] mass_mailing: show blacklist button by default on portal

We now consider being able to blacklist their email is a default behavior for
users being redirected to the subscription management portal page.

LINKS

Task-3082546 (Mass Mailing: Fix assets and unsubscribe page)
Task-2710804 (Mail: Clean MailThread API)
Prepares Task-2669037 (Mass Mailing: Subscription page code cleaning)
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow refactoring)

closes odoo/odoo#106568

Related: odoo/upgrade#4077
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-25 18:55:22 +01:00
2022-10-06 14:56:52 +02:00
2022-11-25 09:53:25 +01:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%