Skip to content

Commit

Permalink
Merge PR #526 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 10, 2023
2 parents 246763f + cdce3c5 commit 333fab2
Show file tree
Hide file tree
Showing 20 changed files with 967 additions and 0 deletions.
91 changes: 91 additions & 0 deletions crm_security_group/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
========================
CRM Only Security Groups
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9bd268e2f74a9fcfab1fdb5e2a80aa9a0f11c96f7a6a2b770c7b8dc0e22200a2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
:target: https://github.com/OCA/crm/tree/16.0/crm_security_group
:alt: OCA/crm
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/crm-16-0/crm-16-0-crm_security_group
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds new security options to CRM by creating 3 groups (Own Documents Only, All Documents and Administrator) to separate Sales and CRM apps permissions

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

- Remove sale_crm dependency (now is not possible), maybe split this part in other addon

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_security_group%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`__:

* Víctor Martínez

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
:target: https://github.com/victoralmau
:alt: victoralmau

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-victoralmau|

This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/16.0/crm_security_group>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file added crm_security_group/__init__.py
Empty file.
23 changes: 23 additions & 0 deletions crm_security_group/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "CRM Only Security Groups",
"summary": "Add new group in Sales to show only CRM",
"version": "16.0.1.0.0",
"category": "Customer Relationship Management",
"website": "https://github.com/OCA/crm",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["crm", "sale_crm"],
# sale_crm dependency is necessary to add groups in some view
"maintainers": ["victoralmau"],
"data": [
"security/security.xml",
"security/ir.model.access.csv",
"views/crm_lead_views.xml",
"views/crm_team_views.xml",
"views/menu_items.xml",
],
}
34 changes: 34 additions & 0 deletions crm_security_group/i18n/crm_security_group.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_security_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_manager
msgid "Administrator"
msgstr ""

#. module: crm_security_group
#: model:ir.module.category,name:crm_security_group.module_category_crm_crm
msgid "CRM"
msgstr ""

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_all_leads
msgid "User: All Documents"
msgstr ""

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_own_leads
msgid "User: Own Documents Only"
msgstr ""
37 changes: 37 additions & 0 deletions crm_security_group/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_security_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-08-17 14:11+0000\n"
"Last-Translator: Víctor Martínez <victor.martinez@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_manager
msgid "Administrator"
msgstr "Administrador"

#. module: crm_security_group
#: model:ir.module.category,name:crm_security_group.module_category_crm_crm
msgid "CRM"
msgstr "CRM"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_all_leads
msgid "User: All Documents"
msgstr "Usuario: Todos los documentos"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_own_leads
msgid "User: Own Documents Only"
msgstr "Usuario: Mostrar solo documentos propios"
37 changes: 37 additions & 0 deletions crm_security_group/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_security_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-06-13 16:12+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_manager
msgid "Administrator"
msgstr "Amministratore"

#. module: crm_security_group
#: model:ir.module.category,name:crm_security_group.module_category_crm_crm
msgid "CRM"
msgstr "CRM"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_all_leads
msgid "User: All Documents"
msgstr "Utente: tutti i documenti"

#. module: crm_security_group
#: model:res.groups,name:crm_security_group.group_crm_own_leads
msgid "User: Own Documents Only"
msgstr "Utente: solo i propri documenti"
3 changes: 3 additions & 0 deletions crm_security_group/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* Víctor Martínez
1 change: 1 addition & 0 deletions crm_security_group/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds new security options to CRM by creating 3 groups (Own Documents Only, All Documents and Administrator) to separate Sales and CRM apps permissions
1 change: 1 addition & 0 deletions crm_security_group/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove sale_crm dependency (now is not possible), maybe split this part in other addon
10 changes: 10 additions & 0 deletions crm_security_group/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_crm_lead_user,crm.lead.user,crm.model_crm_lead,crm_security_group.group_crm_own_leads,1,1,1,0
access_crm_team_user,crm.team.user,sales_team.model_crm_team,crm_security_group.group_crm_own_leads,1,0,0,0
access_crm_team_manager,crm.team.manager,sales_team.model_crm_team,crm_security_group.group_crm_own_leads,1,1,1,1
access_crm_stage_manager,crm.stage.manager,crm.model_crm_stage,crm_security_group.group_crm_manager,1,1,1,1
access_crm_tag_own_leads,sale_team.crm.tag.own.leads,sales_team.model_crm_tag,crm_security_group.group_crm_own_leads,1,1,1,0
access_crm_tag_manager,sale_team.crm.tag.manager,sales_team.model_crm_tag,crm_security_group.group_crm_manager,1,1,1,1
access_crm_lead_scoring_frequency_user,crm.lead.scoring.frequency.user,crm.model_crm_lead_scoring_frequency,crm_security_group.group_crm_own_leads,1,0,0,0
access_crm_lead_scoring_frequency_field_user,crm.lead.scoring.frequency.field.user,crm.model_crm_lead_scoring_frequency_field,crm_security_group.group_crm_own_leads,1,0,0,0
access_crm_lead_lost_user,crm.lead.user,crm.model_crm_lead_lost,crm_security_group.group_crm_own_leads,1,1,1,0
54 changes: 54 additions & 0 deletions crm_security_group/security/security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="module_category_crm_crm" model="ir.module.category">
<field name="name">CRM</field>
<field name="parent_id" ref="base.module_category_sales" />
</record>
<record id="group_crm_own_leads" model="res.groups">
<field name="name">User: Own Documents Only</field>
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
</record>
<record id="group_crm_all_leads" model="res.groups">
<field name="name">User: All Documents</field>
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
<field
name="implied_ids"
eval="[(4, ref('crm_security_group.group_crm_own_leads'))]"
/>
</record>
<record id="group_crm_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
<field
name="implied_ids"
eval="[(4, ref('crm_security_group.group_crm_all_leads'))]"
/>
<field
name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
</record>
<data noupdate="1">
<record id="crm_personal_rule" model="ir.rule">
<field name="name">Personal Leads</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field
name="domain_force"
>['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field
name="groups"
eval="[(4, ref('crm_security_group.group_crm_own_leads'))]"
/>
</record>
<record id="crm_see_all" model="ir.rule">
<field name="name">All Leads</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field name="domain_force">[(1,'=',1)]</field>
<field
name="groups"
eval="[(4, ref('crm_security_group.group_crm_all_leads'))]"
/>
</record>
</data>
</odoo>
Binary file added crm_security_group/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 333fab2

Please sign in to comment.