From 1af4053f065ac8f742bcc7bfc58842202ab436c0 Mon Sep 17 00:00:00 2001 From: Anna Janiszewska Date: Wed, 11 Sep 2024 09:44:59 +0200 Subject: [PATCH] [IMP] mail_drop_target: introduce group to control mailing_trace model access --- mail_drop_target/__manifest__.py | 8 ++++++-- mail_drop_target/security/groups.xml | 12 ++++++++++++ mail_drop_target/security/ir.model.access.csv | 2 ++ mail_drop_target/static/description/index.html | 11 +++++++---- 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 mail_drop_target/security/groups.xml create mode 100644 mail_drop_target/security/ir.model.access.csv diff --git a/mail_drop_target/__manifest__.py b/mail_drop_target/__manifest__.py index a543bb1137..33b1a66b2b 100644 --- a/mail_drop_target/__manifest__.py +++ b/mail_drop_target/__manifest__.py @@ -8,9 +8,13 @@ "category": "Discuss", "website": "https://github.com/OCA/social", "summary": "Attach emails to Odoo by dragging them from your desktop", - "depends": ["mail"], + "depends": ["mail", "mass_mailing"], "external_dependencies": {"python": ["extract_msg", "cryptography<37"]}, - "data": ["views/res_config_settings_views.xml"], + "data": [ + "security/groups.xml", + "security/ir.model.access.csv", + "views/res_config_settings_views.xml", + ], "assets": { "web.assets_backend": [ "mail_drop_target/static/src/js/file_uploader.esm.js", diff --git a/mail_drop_target/security/groups.xml b/mail_drop_target/security/groups.xml new file mode 100644 index 0000000000..1599858483 --- /dev/null +++ b/mail_drop_target/security/groups.xml @@ -0,0 +1,12 @@ + + + + Drop email in chatter + + + + + + + + diff --git a/mail_drop_target/security/ir.model.access.csv b/mail_drop_target/security/ir.model.access.csv new file mode 100644 index 0000000000..2608273f9c --- /dev/null +++ b/mail_drop_target/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mailing_trace_user,mailing.trace.user,mass_mailing.model_mailing_trace,mail_drop_target.group_mailing_drop_mail,1,1,1,1 diff --git a/mail_drop_target/static/description/index.html b/mail_drop_target/static/description/index.html index ea285b9230..a7f4c9cd84 100644 --- a/mail_drop_target/static/description/index.html +++ b/mail_drop_target/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -436,7 +437,9 @@

Other credits

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.