Skip to content

Commit 4d1f330

Browse files
authored
Merge pull request #417 from OCA/19.0
Syncing from upstream OCA/server-backend (19.0)
2 parents 8a9c0d0 + 9b05edd commit 4d1f330

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+30434
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ server-backend
1717

1818
[//]: # (addons)
1919

20-
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
20+
Available addons
21+
----------------
22+
addon | version | maintainers | summary
23+
--- | --- | --- | ---
24+
[base_user_role](base_user_role/) | 19.0.1.0.0 | <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> <a href='https://github.com/jcdrubay'><img src='https://github.com/jcdrubay.png' width='32' height='32' style='border-radius:50%;' alt='jcdrubay'/></a> <a href='https://github.com/novawish'><img src='https://github.com/novawish.png' width='32' height='32' style='border-radius:50%;' alt='novawish'/></a> | User roles
2125

2226
[//]: # (end addons)
2327

base_user_role/README.rst

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
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+
5+
==========
6+
User roles
7+
==========
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:40bbb3b31d135e6855f8b5f17ee30daea89fa5b870f8caa9716c9209605ea6f0
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Production/Stable
20+
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
22+
:alt: License: LGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github
24+
:target: https://github.com/OCA/server-backend/tree/19.0/base_user_role
25+
:alt: OCA/server-backend
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/server-backend-19-0/server-backend-19-0-base_user_role
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=19.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module was written to extend the standard functionality regarding
36+
users and groups management. It helps creating well-defined user roles
37+
and associating them to users.
38+
39+
It can become very hard to maintain a large number of user profiles over
40+
time, juggling with many technical groups. For this purpose, this module
41+
will help you to:
42+
43+
- define functional roles by aggregating low-level groups,
44+
- set user accounts with the predefined roles (roles are cumulative),
45+
- update groups of all relevant user accounts (all at once),
46+
- ensure that user accounts will have the groups defined in their
47+
roles (nothing more, nothing less). In other words, you can not set
48+
groups manually on a user as long as there is roles configured on
49+
it,
50+
- activate/deactivate roles depending on the date (useful to plan
51+
holidays, etc)
52+
- get a quick overview of roles and the related user accounts.
53+
54+
That way you make clear the different responsabilities within a company,
55+
and are able to add and update user accounts in a scalable and reliable
56+
way.
57+
58+
**Table of contents**
59+
60+
.. contents::
61+
:local:
62+
63+
Configuration
64+
=============
65+
66+
To configure this module, you need to go to *Settings / Users / Roles*,
67+
and create a new role. From there, you can add groups to compose your
68+
role, and then associate users to it.
69+
70+
You can also define default roles for a new user by editing the user
71+
called "Default User".
72+
73+
Roles:
74+
75+
|image1|
76+
77+
Add groups:
78+
79+
|image2|
80+
81+
Add users (with dates or not):
82+
83+
|image3|
84+
85+
Instead of creating roles from scratch, it is possible to create a role
86+
based on the groups of an existing user: select or open the user and
87+
choose "Create role from user" in the action menu.
88+
89+
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/roles.png
90+
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/role_groups.png
91+
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/role_users.png
92+
93+
Usage
94+
=====
95+
96+
To use this module, you need to:
97+
98+
1. Go to Configuration / Users / Users choose user and set Roles:
99+
100+
|image|
101+
102+
.. |image| image:: https://raw.githubusercontent.com/OCA/server-backend/base_user_role/static/description/user_form.png
103+
104+
Bug Tracker
105+
===========
106+
107+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_.
108+
In case of trouble, please check there if your issue has already been reported.
109+
If you spotted it first, help us to smash it by providing a detailed and welcomed
110+
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_user_role%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
111+
112+
Do not contact contributors directly about support or help with technical issues.
113+
114+
Credits
115+
=======
116+
117+
Authors
118+
-------
119+
120+
* ABF OSIELL
121+
122+
Contributors
123+
------------
124+
125+
- Sébastien Alix <[email protected]>
126+
- Duc, Dao Dong <[email protected]>
127+
(https://komit-consulting.com)
128+
- Jean-Charles Drubay <[email protected]>
129+
(https://komit-consulting.com)
130+
- Alan Ramos <[email protected]> (https://www.jarsa.com.mx)
131+
- Harald Panten <[email protected]>
132+
- Kevin Khao <[email protected]>
133+
- Tatiana Deribina <[email protected]> (https://sprintit.fi)
134+
- Guillem Casassas <[email protected]>
135+
- Guillaume Pothier <[email protected]>
136+
137+
Do not contact contributors directly about support or help with
138+
technical issues.
139+
140+
Other credits
141+
-------------
142+
143+
Images
144+
~~~~~~
145+
146+
- Oxygen Team:
147+
`Icon <http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-user-group-new-icon.html>`__
148+
(LGPL)
149+
150+
Maintainers
151+
-----------
152+
153+
This module is maintained by the OCA.
154+
155+
.. image:: https://odoo-community.org/logo.png
156+
:alt: Odoo Community Association
157+
:target: https://odoo-community.org
158+
159+
OCA, or the Odoo Community Association, is a nonprofit organization whose
160+
mission is to support the collaborative development of Odoo features and
161+
promote its widespread use.
162+
163+
.. |maintainer-sebalix| image:: https://github.com/sebalix.png?size=40px
164+
:target: https://github.com/sebalix
165+
:alt: sebalix
166+
.. |maintainer-jcdrubay| image:: https://github.com/jcdrubay.png?size=40px
167+
:target: https://github.com/jcdrubay
168+
:alt: jcdrubay
169+
.. |maintainer-novawish| image:: https://github.com/novawish.png?size=40px
170+
:target: https://github.com/novawish
171+
:alt: novawish
172+
173+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
174+
175+
|maintainer-sebalix| |maintainer-jcdrubay| |maintainer-novawish|
176+
177+
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/19.0/base_user_role>`_ project on GitHub.
178+
179+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

base_user_role/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from . import wizards

base_user_role/__manifest__.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2014 ABF OSIELL <http://osiell.com>
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
3+
4+
5+
{
6+
"name": "User roles",
7+
"version": "19.0.1.0.0",
8+
"category": "Tools",
9+
"author": "ABF OSIELL, Odoo Community Association (OCA)",
10+
"license": "LGPL-3",
11+
"development_status": "Production/Stable",
12+
"maintainers": ["sebalix", "jcdrubay", "novawish"],
13+
"website": "https://github.com/OCA/server-backend",
14+
"depends": ["base"],
15+
"data": [
16+
"security/ir.model.access.csv",
17+
"data/ir_cron.xml",
18+
"data/ir_module_category.xml",
19+
"views/role.xml",
20+
"views/user.xml",
21+
"views/group.xml",
22+
"wizards/create_from_user.xml",
23+
"wizards/wizard_groups_into_role.xml",
24+
],
25+
"installable": True,
26+
}

base_user_role/data/ir_cron.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2016 ABF OSIELL <http://osiell.com>
3+
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
4+
-->
5+
<odoo noupdate="1">
6+
<record model="ir.cron" id="cron_update_users">
7+
<field name='name'>Update user roles</field>
8+
<field name='interval_number'>3</field>
9+
<field name='interval_type'>hours</field>
10+
<field name="active">True</field>
11+
<field name="model_id" ref="base_user_role.model_res_users_role" />
12+
<field name="state">code</field>
13+
<field name="code">model.cron_update_users()</field>
14+
</record>
15+
</odoo>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2016 ABF OSIELL <http://osiell.com>
3+
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
4+
-->
5+
<odoo>
6+
<!--
7+
This module category aims to be linked to role/group you create in your own
8+
module (field 'res.groups.category_id').
9+
By doing this you'll have the section 'User roles' in the "Access rights" tab
10+
on the user form which will regroup all roles/groups for a better visibility.
11+
-->
12+
<record model="ir.module.category" id="ir_module_category_role">
13+
<field name='name'>User roles</field>
14+
</record>
15+
</odoo>

0 commit comments

Comments
 (0)