From 50762307e45737161050f6ea0973190599fa1813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 5 Jun 2023 10:45:52 +0000 Subject: [PATCH] [IMP] base, mail: split company email colors from document colors PURPOSE Settings allow to change colors used in emails (primary and secondary colors). Those are used for headers and buttons. They are currently shared with colors used for base documents and reports layout: changing email colors change documents colors, which is not expected nor clearly indicated. SPECIFICATIONS Split configuration: colors used in documents may differ from colors used in emails. Duplicate color fields (primary and secondary). To ease setup when updating documents colors, update mail colors accordingly. Inverse is not true as we consider documents being the main configuration, and emails a more fine-grain configuration. Task-3346388 Part-of: odoo/odoo#123678 --- addons/digest/data/digest_data.xml | 4 +- addons/mail/__manifest__.py | 2 +- .../data/mail_templates_email_layouts.xml | 10 ++-- addons/mail/models/res_company.py | 27 +++++++++- addons/mail/models/res_config_settings.py | 4 +- addons/mail/tests/__init__.py | 1 + addons/mail/tests/test_res_company.py | 52 +++++++++++++++++++ .../mail/views/res_config_settings_views.xml | 4 +- .../data/mailing_data_templates.xml | 2 +- 9 files changed, 93 insertions(+), 13 deletions(-) create mode 100644 addons/mail/tests/test_res_company.py diff --git a/addons/digest/data/digest_data.xml b/addons/digest/data/digest_data.xml index eec141479cc..5f8b2c16820 100644 --- a/addons/digest/data/digest_data.xml +++ b/addons/digest/data/digest_data.xml @@ -11,7 +11,7 @@