diff --git a/mass_mailing_security_group/README.rst b/mass_mailing_security_group/README.rst new file mode 100644 index 00000000..c79dada7 --- /dev/null +++ b/mass_mailing_security_group/README.rst @@ -0,0 +1,58 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=========================== +Mass mailing security group +=========================== + +This module adds these security features: + +* ACL for allowing marketing user group to remove mass.mailing objects +* Security rule to allow marketing user to delete only his unsent mail.mass_mailing objects +* Security rule to allow marketing manager to delete all unsent mail.mass_mailing objects + +For sent mail.mass_mailing objects, only a user in Administration / Settings group +could remove them, like standard Odoo defines. + + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/205/9.0 + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and +welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Rafael Blasco +* Antonio Espinosa +* Vicent Cubells + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/mass_mailing_security_group/__init__.py b/mass_mailing_security_group/__init__.py new file mode 100644 index 00000000..813a1b5d --- /dev/null +++ b/mass_mailing_security_group/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2016 Tecnativa S.L. - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import wizards diff --git a/mass_mailing_security_group/__openerp__.py b/mass_mailing_security_group/__openerp__.py new file mode 100644 index 00000000..17eb5ff8 --- /dev/null +++ b/mass_mailing_security_group/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# © 2016 Tecnativa S.L. - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': "Mass mailing security group", + 'category': 'Marketing', + 'version': '9.0.1.0.0', + 'depends': [ + 'mass_mailing', + ], + 'external_dependencies': {}, + 'data': [ + 'security/ir.model.access.csv', + 'security/mail_mass_mailing_security.xml', + ], + 'author': 'Tecnativa, ' + 'Odoo Community Association (OCA)', + 'website': 'http://www.tecnativa.com', + 'license': 'AGPL-3', + 'installable': True, +} diff --git a/mass_mailing_security_group/i18n/de.po b/mass_mailing_security_group/i18n/de.po new file mode 100644 index 00000000..acd85934 --- /dev/null +++ b/mass_mailing_security_group/i18n/de.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * marketing_security_group +# +# Translators: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: social (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-17 01:37+0000\n" +"PO-Revision-Date: 2016-01-18 15:28+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-social-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: marketing_security_group +#: model:ir.model,name:marketing_security_group.model_mail_mass_mailing_test +msgid "Sample Mail Wizard" +msgstr "Beispiel-MailAssistent" diff --git a/mass_mailing_security_group/i18n/es.po b/mass_mailing_security_group/i18n/es.po new file mode 100644 index 00000000..3763a689 --- /dev/null +++ b/mass_mailing_security_group/i18n/es.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * marketing_security_group +# +# Translators: +# Antonio Trueba, 2016 +msgid "" +msgstr "" +"Project-Id-Version: social (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-17 01:37+0000\n" +"PO-Revision-Date: 2016-02-16 12:32+0000\n" +"Last-Translator: Antonio Trueba\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-social-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: marketing_security_group +#: model:ir.model,name:marketing_security_group.model_mail_mass_mailing_test +msgid "Sample Mail Wizard" +msgstr "Asistente para correo de ejemplo" diff --git a/mass_mailing_security_group/i18n/fr.po b/mass_mailing_security_group/i18n/fr.po new file mode 100644 index 00000000..7dfafecf --- /dev/null +++ b/mass_mailing_security_group/i18n/fr.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * marketing_security_group +# +# Translators: +# Christophe CHAUVET , 2016 +msgid "" +msgstr "" +"Project-Id-Version: social (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-30 01:07+0000\n" +"PO-Revision-Date: 2016-06-17 14:43+0000\n" +"Last-Translator: Christophe CHAUVET \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-social-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: marketing_security_group +#: model:ir.model,name:marketing_security_group.model_mail_mass_mailing_test +msgid "Sample Mail Wizard" +msgstr "Exemple d'assistant de courriel" diff --git a/mass_mailing_security_group/i18n/sl.po b/mass_mailing_security_group/i18n/sl.po new file mode 100644 index 00000000..7b7fa050 --- /dev/null +++ b/mass_mailing_security_group/i18n/sl.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * marketing_security_group +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: social (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-05 19:40+0000\n" +"PO-Revision-Date: 2015-12-24 06:03+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-social-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: marketing_security_group +#: model:ir.model,name:marketing_security_group.model_mail_mass_mailing_test +msgid "Sample Mail Wizard" +msgstr "Vzorec čarovnika za pošto" diff --git a/mass_mailing_security_group/security/ir.model.access.csv b/mass_mailing_security_group/security/ir.model.access.csv new file mode 100644 index 00000000..c0dcadb3 --- /dev/null +++ b/mass_mailing_security_group/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_mass_mailing_user,mail.mass_mailing.user,mass_mailing.model_mail_mass_mailing,marketing.group_lead_automation_user,1,1,1,1 diff --git a/mass_mailing_security_group/security/mail_mass_mailing_security.xml b/mass_mailing_security_group/security/mail_mass_mailing_security.xml new file mode 100644 index 00000000..1a8941a4 --- /dev/null +++ b/mass_mailing_security_group/security/mail_mass_mailing_security.xml @@ -0,0 +1,26 @@ + + + + + Marketing user - Delete own unsent mass mailings + + [('create_uid', '=', user.id), ('state', 'in', ('draft', 'test'))] + + + + + + + + + Marketing manager - Delete all unsent mass mailings + + [('state', 'in', ('draft', 'test'))] + + + + + + + + diff --git a/mass_mailing_security_group/static/description/icon.png b/mass_mailing_security_group/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/mass_mailing_security_group/static/description/icon.png differ diff --git a/mass_mailing_security_group/wizards/__init__.py b/mass_mailing_security_group/wizards/__init__.py new file mode 100644 index 00000000..f4f4f20d --- /dev/null +++ b/mass_mailing_security_group/wizards/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2016 Tecnativa S.L. - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_mailing diff --git a/mass_mailing_security_group/wizards/test_mailing.py b/mass_mailing_security_group/wizards/test_mailing.py new file mode 100644 index 00000000..abad9ef8 --- /dev/null +++ b/mass_mailing_security_group/wizards/test_mailing.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# © 2016 Tecnativa S.L. - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields + + +class MailMassMailingTest(models.TransientModel): + _inherit = 'mail.mass_mailing.test' + + mass_mailing_id = fields.Many2one(ondelete='cascade')