Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] mail_drop_target: add group to control mailing_trace model access #1438

Draft
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mail_drop_target/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to force those using mail_drop_target to install mass_mailing.

I the dependency is needed because what you fix is only happening when mass_mailing is installed, then you need to submit a new "glue" module.

"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",
Expand Down
12 changes: 12 additions & 0 deletions mail_drop_target/security/groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" ?>
<odoo>
<record model="res.groups" id="group_mailing_drop_mail">
<field name="name">Drop email in chatter</field>
<field name="category_id" ref="base.module_category_marketing_email_marketing" />
</record>

<record model="res.groups" id="base.group_user">
<field name="implied_ids" eval="[(4, ref('mail_drop_target.group_mailing_drop_mail'))]" />
</record>

</odoo>
2 changes: 2 additions & 0 deletions mail_drop_target/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -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
11 changes: 7 additions & 4 deletions mail_drop_target/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
: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.
Expand Down Expand Up @@ -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 }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -436,7 +437,9 @@ <h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
Loading