Skip to content

Commit 6b1e37f

Browse files
committed
[MIG] crm_security_group: Migration to 19.0
1 parent 0b4290d commit 6b1e37f

6 files changed

Lines changed: 49 additions & 61 deletions

File tree

crm_security_group/README.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
========================
26
CRM Only Security Groups
37
========================
@@ -13,17 +17,17 @@ CRM Only Security Groups
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
20-
:target: https://github.com/OCA/crm/tree/18.0/crm_security_group
24+
:target: https://github.com/OCA/crm/tree/19.0/crm_security_group
2125
:alt: OCA/crm
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/crm-18-0/crm-18-0-crm_security_group
27+
:target: https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_security_group
2428
:alt: Translate me on Weblate
2529
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +53,7 @@ Bug Tracker
4953
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
5054
In case of trouble, please check there if your issue has already been reported.
5155
If you spotted it first, help us to smash it by providing a detailed and welcomed
52-
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_security_group%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
56+
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_security_group%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5357

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

@@ -89,6 +93,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
8993

9094
|maintainer-victoralmau|
9195

92-
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/18.0/crm_security_group>`_ project on GitHub.
96+
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/19.0/crm_security_group>`_ project on GitHub.
9397

9498
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

crm_security_group/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "CRM Only Security Groups",
55
"summary": "Add new group in Sales to show only CRM",
6-
"version": "18.0.1.0.0",
6+
"version": "19.0.1.0.0",
77
"category": "Customer Relationship Management",
88
"website": "https://github.com/OCA/crm",
99
"author": "Tecnativa, Odoo Community Association (OCA)",

crm_security_group/security/security.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
<record id="module_category_crm_crm" model="ir.module.category">
3+
<record id="module_privilege_crm_crm" model="res.groups.privilege">
44
<field name="name">CRM</field>
5-
<field name="parent_id" ref="base.module_category_sales" />
5+
<field name="category_id" ref="base.module_category_sales" />
66
</record>
77
<record id="group_crm_own_leads" model="res.groups">
88
<field name="name">User: Own Documents Only</field>
9-
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
9+
<field name="privilege_id" ref="crm_security_group.module_privilege_crm_crm" />
1010
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
1111
</record>
1212
<record id="group_crm_all_leads" model="res.groups">
1313
<field name="name">User: All Documents</field>
14-
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
14+
<field name="privilege_id" ref="crm_security_group.module_privilege_crm_crm" />
1515
<field
1616
name="implied_ids"
1717
eval="[(4, ref('crm_security_group.group_crm_own_leads'))]"
1818
/>
1919
</record>
2020
<record id="group_crm_manager" model="res.groups">
2121
<field name="name">Administrator</field>
22-
<field name="category_id" ref="crm_security_group.module_category_crm_crm" />
22+
<field name="privilege_id" ref="crm_security_group.module_privilege_crm_crm" />
2323
<field
2424
name="implied_ids"
2525
eval="[(4, ref('crm_security_group.group_crm_all_leads'))]"
2626
/>
2727
<field
28-
name="users"
28+
name="user_ids"
2929
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
3030
/>
3131
</record>

crm_security_group/static/description/index.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>CRM Only Security Groups</title>
6+
<title>README.rst</title>
77
<style type="text/css">
88

99
/*
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="crm-only-security-groups">
364-
<h1 class="title">CRM Only Security Groups</h1>
363+
<div class="document">
365364

365+
366+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368+
</a>
369+
<div class="section" id="crm-only-security-groups">
370+
<h1>CRM Only Security Groups</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370375
!! source digest: sha256:ff827f2c5570d1bb578f6a4d533f423854d8a9852c19f93135d98e8844226261
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/crm/tree/18.0/crm_security_group"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-18-0/crm-18-0-crm_security_group"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/crm&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/crm/tree/19.0/crm_security_group"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_security_group"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/crm&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>This module adds new security options to CRM by creating 3 groups (Own
374379
Documents Only, All Documents and Administrator) to separate Sales and
375380
CRM apps permissions</p>
@@ -387,30 +392,30 @@ <h1 class="title">CRM Only Security Groups</h1>
387392
</ul>
388393
</div>
389394
<div class="section" id="known-issues-roadmap">
390-
<h1><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h1>
395+
<h2><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h2>
391396
<ul class="simple">
392397
<li>Remove sale_crm dependency (now is not possible), maybe split this
393398
part in other addon</li>
394399
</ul>
395400
</div>
396401
<div class="section" id="bug-tracker">
397-
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
402+
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
398403
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/crm/issues">GitHub Issues</a>.
399404
In case of trouble, please check there if your issue has already been reported.
400405
If you spotted it first, help us to smash it by providing a detailed and welcomed
401-
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_security_group%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
406+
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_security_group%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
402407
<p>Do not contact contributors directly about support or help with technical issues.</p>
403408
</div>
404409
<div class="section" id="credits">
405-
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
410+
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
406411
<div class="section" id="authors">
407-
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
412+
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
408413
<ul class="simple">
409414
<li>Tecnativa</li>
410415
</ul>
411416
</div>
412417
<div class="section" id="contributors">
413-
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
418+
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
414419
<ul class="simple">
415420
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
416421
<li>Víctor Martínez</li>
@@ -419,7 +424,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
419424
</ul>
420425
</div>
421426
<div class="section" id="maintainers">
422-
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
427+
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
423428
<p>This module is maintained by the OCA.</p>
424429
<a class="reference external image-reference" href="https://odoo-community.org">
425430
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -429,10 +434,11 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
429434
promote its widespread use.</p>
430435
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
431436
<p><a class="reference external image-reference" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
432-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/18.0/crm_security_group">OCA/crm</a> project on GitHub.</p>
437+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/19.0/crm_security_group">OCA/crm</a> project on GitHub.</p>
433438
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
434439
</div>
435440
</div>
436441
</div>
442+
</div>
437443
</body>
438444
</html>

crm_security_group/views/crm_team_views.xml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
<field name="model">crm.team</field>
66
<field name="inherit_id" ref="sales_team.crm_team_view_kanban_dashboard" />
77
<field name="arch" type="xml">
8-
<button name="action_primary_channel_button" position="attributes">
8+
<xpath
9+
expr="//kanban[@action='action_primary_channel_button']"
10+
position="attributes"
11+
>
912
<attribute
1013
name="groups"
1114
>crm_security_group.group_crm_own_leads</attribute>
12-
</button>
15+
</xpath>
1316
</field>
1417
</record>
1518
<record id="sale_crm_team_view_kanban_dashboard" model="ir.ui.view">
@@ -20,15 +23,6 @@
2023
<field name="invoiced_target" position="attributes">
2124
<attribute name="groups">sales_team.group_sale_salesman</attribute>
2225
</field>
23-
<xpath
24-
expr="//div[@t-if='record.quotations_count.raw_value']"
25-
position="attributes"
26-
>
27-
<attribute name="groups">sales_team.group_sale_salesman</attribute>
28-
</xpath>
29-
<xpath expr="//div[@name='orders_to_invoice']" position="attributes">
30-
<attribute name="groups">sales_team.group_sale_salesman</attribute>
31-
</xpath>
3226
<xpath expr="//div[@name='sales_report']" position="attributes">
3327
<attribute name="groups">sales_team.group_sale_salesman</attribute>
3428
</xpath>
@@ -46,23 +40,7 @@
4640
<field name="inherit_id" ref="crm.crm_team_view_kanban_dashboard" />
4741
<field name="arch" type="xml">
4842
<xpath
49-
expr="//div[@t-if='record.lead_unassigned_count.raw_value']"
50-
position="attributes"
51-
>
52-
<attribute
53-
name="groups"
54-
>crm_security_group.group_crm_own_leads</attribute>
55-
</xpath>
56-
<xpath
57-
expr="//div[@t-if='record.opportunities_count.raw_value']"
58-
position="attributes"
59-
>
60-
<attribute
61-
name="groups"
62-
>crm_security_group.group_crm_own_leads</attribute>
63-
</xpath>
64-
<xpath
65-
expr="//div[@t-if='record.opportunities_overdue_count.raw_value']"
43+
expr="//a[@name='action_open_unassigned_leads']"
6644
position="attributes"
6745
>
6846
<attribute

crm_security_group/views/menu_items.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,46 @@
22
<odoo>
33
<record id="crm.crm_menu_root" model="ir.ui.menu">
44
<field
5-
name="groups_id"
5+
name="group_ids"
66
eval="[(6,0,[ref('crm_security_group.group_crm_own_leads')])]"
77
/>
88
</record>
99
<record id="sale_crm.sale_order_menu_quotations_crm" model="ir.ui.menu">
10-
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]" />
10+
<field name="group_ids" eval="[(4, ref('sales_team.group_sale_salesman'))]" />
1111
</record>
1212
<record id="crm.crm_lead_menu_my_activities" model="ir.ui.menu">
1313
<field
14-
name="groups_id"
14+
name="group_ids"
1515
eval="[(4, ref('crm_security_group.group_crm_own_leads'))]"
1616
/>
1717
</record>
1818
<record id="crm.sales_team_menu_team_pipeline" model="ir.ui.menu">
1919
<field
20-
name="groups_id"
20+
name="group_ids"
2121
eval="[(4, ref('crm_security_group.group_crm_manager'))]"
2222
/>
2323
</record>
2424
<record id="crm.crm_menu_report" model="ir.ui.menu">
2525
<field
26-
name="groups_id"
26+
name="group_ids"
2727
eval="[(6,0,[ref('crm_security_group.group_crm_manager')])]"
2828
/>
2929
</record>
3030
<record id="crm.crm_menu_config" model="ir.ui.menu">
3131
<field
32-
name="groups_id"
32+
name="group_ids"
3333
eval="[(4, ref('crm_security_group.group_crm_manager'))]"
3434
/>
3535
</record>
3636
<record id="crm.mail_activity_plan_menu_config_lead" model="ir.ui.menu">
3737
<field
38-
name="groups_id"
38+
name="group_ids"
3939
eval="[(6,0,[ref('crm_security_group.group_crm_manager')])]"
4040
/>
4141
</record>
4242
<record id="crm.menu_crm_config_lead" model="ir.ui.menu">
4343
<field
44-
name="groups_id"
44+
name="group_ids"
4545
eval="[(6,0,[ref('crm_security_group.group_crm_manager')])]"
4646
/>
4747
</record>

0 commit comments

Comments
 (0)