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

[17.0] [MIG] base_user_role: Migration to 17.0 #253

Merged
merged 123 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
fc5ffce
8.0 - New module 'base_user_role' to manage user roles efficiently (#…
sebalix Dec 9, 2016
6fa7cb8
base_user_role: display roles as first tab in user form
sbidoul Dec 10, 2016
fb1c809
base_user_role - Set a default category to associated groups
sebalix Dec 10, 2016
300dd73
[MIG] base_user_role: Port to 10.0
adrienpeiffer Jan 2, 2017
b34ec33
[FIX] Crash in base_user_role when role_id is not set on res.users.ro…
alexis-via Jun 12, 2017
2dabb00
[10.0][FIX] User group not updating when removing a user from the rol…
benwillig Aug 11, 2017
f5eabd5
[MIG] base_user_role: Migration to 11.0
Nov 19, 2017
59be83c
[FIX+IMP] base_user_role: Several things:
sebalix Sep 21, 2017
a9b4d7c
[MIG] Update test cases for testing (unlink role and role line) to ne…
Nov 23, 2017
1450a27
[IMP] Use default user to define default roles to create for a new user
benwillig Oct 12, 2017
88c28fa
[UPD] Update base_user_role.pot
oca-travis Aug 30, 2018
8aba91c
Translated using Weblate (Danish)
hhgabelgaard Aug 30, 2018
1928966
[MIG] base_user_role: Migration to 12.0
Oct 14, 2018
06db9a9
[UPD] README.rst
OCA-git-bot Nov 19, 2018
2d4b528
[UPD] Update base_user_role.pot
oca-travis Nov 19, 2018
1289b1d
Update translation files
oca-transbot Nov 25, 2018
9887a4b
[UPD] README.rst
OCA-git-bot Dec 2, 2018
86f06a2
[12.0][FIX] readme
HviorForgeFlow Dec 11, 2018
84be256
[UPD] README.rst
OCA-git-bot Feb 11, 2019
62ec95e
[MIG] base_import_match: Migration to 12.0
ernestotejeda Feb 8, 2019
0159b50
[base_user_role] improve performance by only adding/removing from a user
JordiBForgeFlow Jan 2, 2019
a68a0c1
[UPD] README.rst
OCA-git-bot Jul 29, 2019
181e9d8
[10.0][UPD] base_user_role: Disabled Administrator user selection in …
artux404 Jun 12, 2018
2a1fbb4
Switch AGPL to LGPL license
elicoidal Dec 29, 2018
46ed58b
Revert "[FIX] Crash in base_user_role when role_id is not set on res.…
Jan 29, 2019
8990ad4
Make user_id and role_id required in base_user_role_line
Jan 29, 2019
aa1adbd
[IMP] make base_user_role_line company dependent
Jan 29, 2019
9dce977
FIX check_company
Feb 14, 2019
d5bce8e
[MIG] base_user_role: Migration to 13.0
sebalix Oct 1, 2019
a59018f
[IMP] base_user_role: black, isort
sebalix Dec 16, 2019
f1eff90
[UPD] Update base_user_role.pot
oca-travis Jan 30, 2020
27a2f89
[UPD] README.rst
OCA-git-bot Jan 30, 2020
b3e9dd4
Update translation files
oca-transbot Jan 31, 2020
1e18b4e
Translated using Weblate (Spanish (Mexico))
alan196 Feb 15, 2020
5574300
pre-commit update
OCA-git-bot Mar 14, 2020
464df82
Translated using Weblate (French)
houzefa-abba Sep 28, 2020
0bec68b
[MIG] base_user_role: Migration to 14.0
alan196 Oct 12, 2020
1e84dec
[UPD] Update base_user_role.pot
oca-travis Dec 16, 2020
e08d2c9
[IMP] Fix edition of role
sebastienbeau Dec 20, 2020
27b271d
[IMP] base_user_role: Adding a new tab for user comments in roles form.
HaraldPanten Dec 21, 2020
5923345
[UPD] Update base_user_role.pot
oca-travis Dec 30, 2020
2822ca8
[UPD] README.rst
OCA-git-bot Dec 30, 2020
e768bc7
base_user_role 14.0.1.1.0
OCA-git-bot Dec 30, 2020
cb293e8
Update translation files
oca-transbot Dec 30, 2020
6e2457d
[FIX] base_user_role: remove multicompany functionality
kevinkhao Jan 25, 2021
d2ed571
[UPD] Update base_user_role.pot
oca-travis Jan 27, 2021
84aafd6
base_user_role 14.0.2.0.0
OCA-git-bot Jan 27, 2021
c875d73
Update translation files
oca-transbot Jan 27, 2021
9ec7832
[IMP] base_user_role: UX improvements
kevinkhao Jan 25, 2021
0450dbe
[UPD] Update base_user_role.pot
oca-travis Jan 28, 2021
1723e70
[UPD] README.rst
OCA-git-bot Jan 28, 2021
fb58af1
base_user_role 14.0.2.1.0
OCA-git-bot Jan 28, 2021
d57b58b
Update translation files
oca-transbot Jan 28, 2021
bfa574c
base_user_role 14.0.2.1.1
OCA-git-bot Feb 12, 2021
f696ea1
Translated using Weblate (Spanish)
anasuarez1 Mar 16, 2021
c2c81ba
Translated using Weblate (Vietnamese)
minhdc Sep 25, 2021
13b177c
[MIG] base_user_role: Migration to 15.0
Nov 11, 2021
fc83ee4
[UPD] Update base_user_role.pot
Nov 27, 2021
7a0637f
[UPD] README.rst
OCA-git-bot Nov 27, 2021
323593d
Translated using Weblate (Catalan)
pablontura Apr 13, 2022
b765daa
FIX base_user_role: use ``sudo()`` in ``user_ids`` compute
SilvioC2C May 26, 2022
775b2da
FIX base_user_role: update tests
SilvioC2C May 26, 2022
0d35909
[IMP]base_user_role: Groups-roles navigation
GuillemCForgeFlow Apr 19, 2022
1fb0d8d
[UPD] Update base_user_role.pot
Jun 20, 2022
5986e00
[UPD] README.rst
OCA-git-bot Jun 20, 2022
49526d3
base_user_role 15.0.0.1.0
OCA-git-bot Jun 20, 2022
85e35c9
Update translation files
oca-transbot Jun 20, 2022
2f41f88
[15.0][FIX] UserWarning: Field res.groups.trans_parent_ids should be …
elmeriniemela Jul 11, 2022
484f416
[FIX] base_user_role: tests - include `trans_implied_ids`
kirca Aug 8, 2022
7f99b78
base_user_role 15.0.0.1.1
OCA-git-bot Aug 11, 2022
38b74ca
[FIX] base_user_role: text on role Internal Notes was not saved
dreispt Jan 31, 2022
7d1ae6f
[13.0][FIX]base_user_role: Add compute_sudo
GuillemCForgeFlow Apr 26, 2022
7c1c812
[13.0][FIX]base_user_role: Show active users on Users page
GuillemCForgeFlow May 25, 2022
243bcbc
[UPD] Update base_user_role.pot
Aug 11, 2022
c80a5d6
base_user_role 15.0.0.2.0
OCA-git-bot Aug 11, 2022
9fd93ca
Update translation files
oca-transbot Aug 11, 2022
07a69f8
base_user_role 15.0.0.2.1
OCA-git-bot Aug 11, 2022
4bf66c6
[IMP] base_user_role: black, isort, prettier
apineux Aug 16, 2022
44a80fb
[MIG] base_user_role: Migration to 16.0
apineux Aug 16, 2022
02c5ea5
[UPD] Update base_user_role.pot
Oct 18, 2022
e645e12
[UPD] README.rst
OCA-git-bot Oct 18, 2022
0219bfd
[IMP] base_user_role show rules and access
Kev-Roche Jun 27, 2022
3cb7ca0
Update translation files
weblate Oct 18, 2022
184c9a3
[UPD] Update base_user_role.pot
Oct 20, 2022
8389d53
base_user_role 16.0.1.1.0
OCA-git-bot Oct 20, 2022
6868f49
Update translation files
weblate Oct 20, 2022
e666e53
[DOC] base_user_role: set development status to 'Production/Stable'
sebalix Oct 18, 2022
243a841
[UPD] README.rst
OCA-git-bot Oct 20, 2022
d6ee1f1
base_user_role 16.0.1.1.1
OCA-git-bot Oct 20, 2022
27da915
[UPD] Update base_user_role.pot
Jan 26, 2023
5644a16
Update translation files
weblate Jan 26, 2023
f85f1c2
Add "Create role from user" feature
gpothier Jun 20, 2023
d59c0f8
Fix formatting according to pre-commit hook
gpothier Jun 21, 2023
36ce2ae
Make name field required
gpothier Jun 21, 2023
5d05624
Simplify wizard name
gpothier Jun 21, 2023
08d7602
Undo changes to README and put them in the files in the readme direct…
gpothier Jun 21, 2023
d6cf9b4
Fix model name change in views
gpothier Jun 21, 2023
bc514df
Add test for the create role from user wizard
gpothier Jun 21, 2023
c31ccb3
Use kwargs in with_context, as per pre-commit recommendation
gpothier Jun 21, 2023
2d7d586
Translated using Weblate (Italian)
francesco-ooops Jun 22, 2023
69db8a4
[UPD] Update base_user_role.pot
Jun 24, 2023
7353cae
[UPD] README.rst
OCA-git-bot Jun 24, 2023
8e0ec54
base_user_role 16.0.1.2.0
OCA-git-bot Jun 24, 2023
35cb1bf
Update translation files
weblate Jun 24, 2023
9953617
[FIX] base_user_role: filter domain for user role search
JordiMForgeFlow Jul 6, 2023
73f96de
base_user_role 16.0.1.2.1
OCA-git-bot Jul 10, 2023
22a5f38
Translated using Weblate (Italian)
francesco-ooops Jul 11, 2023
0bba666
Translated using Weblate (French)
ypapouin Jul 17, 2023
f647bce
Translated using Weblate (Spanish)
Ivorra78 Aug 25, 2023
0b1970c
Translated using Weblate (Spanish)
kikopeiro Aug 28, 2023
25b3354
Translated using Weblate (Portuguese)
pedrocs-exo Aug 31, 2023
5f624fb
[UPD] README.rst
OCA-git-bot Sep 3, 2023
98c3441
Translated using Weblate (Italian)
francesco-ooops Sep 7, 2023
952e152
base_user_role - add (copy) in order to allow the duplicate
jdidderen-noviat Sep 11, 2023
74a8524
[UPD] Update base_user_role.pot
Sep 11, 2023
b7d35de
base_user_role 16.0.1.2.2
OCA-git-bot Sep 11, 2023
04441eb
[UPD] README.rst
OCA-git-bot Sep 11, 2023
ba24365
Update translation files
weblate Sep 20, 2023
3dab837
Translated using Weblate (Spanish)
Ivorra78 Oct 3, 2023
39cfe98
[IMP] base_user_role: pre-commit stuff
rven Dec 13, 2023
8e44a19
[MIG] base_user_role: Migration to 17.0
rven Dec 13, 2023
0da74f5
[15.0][IMP] base_user_role: Add role_ids column to tree view.
amh-mw Nov 15, 2023
caab8fa
[15.0][IMP] base_user_role: action to group groups into a role
ArnauCForgeFlow Jan 26, 2024
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
176 changes: 176 additions & 0 deletions base_user_role/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
==========
User roles
==========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c476130dcc75dc43a4aa9cfcc84eba040aafbdb3b9ff2b672278a59bd46f91ef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github
:target: https://github.com/OCA/server-backend/tree/17.0/base_user_role
:alt: OCA/server-backend
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_user_role
: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/server-backend&target_branch=17.0
:alt: Try me on Runboat

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

This module was written to extend the standard functionality regarding
users and groups management. It helps creating well-defined user roles
and associating them to users.

It can become very hard to maintain a large number of user profiles over
time, juggling with many technical groups. For this purpose, this module
will help you to:

- define functional roles by aggregating low-level groups,
- set user accounts with the predefined roles (roles are
cumulative),
- update groups of all relevant user accounts (all at once),
- ensure that user accounts will have the groups defined in their
roles (nothing more, nothing less). In other words, you can not
set groups manually on a user as long as there is roles configured
on it,
- activate/deactivate roles depending on the date (useful to plan
holidays, etc)
- get a quick overview of roles and the related user accounts.

That way you make clear the different responsabilities within a company,
and are able to add and update user accounts in a scalable and reliable
way.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to go to *Settings / Users / Roles*,
and create a new role. From there, you can add groups to compose your
role, and then associate users to it.

You can also define default roles for a new user by editing the user
called "Default User".

Roles:

|image1|

Add groups:

|image2|

Add users (with dates or not):

|image3|

Instead of creating roles from scratch, it is possible to create a role
based on the groups of an existing user: select or open the user and
choose "Create role from user" in the action menu.

.. |image1| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/roles.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/role_groups.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-backend/16.0/base_user_role/static/description/role_users.png

Usage
=====

To use this module, you need to:

1. Go to Configuration / Users / Users choose user and set Roles:

|image|

.. |image| image:: https://raw.githubusercontent.com/OCA/server-backend/base_user_role/static/description/user_form.png

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/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/server-backend/issues/new?body=module:%20base_user_role%0Aversion:%2017.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
-------

* ABF OSIELL

Contributors
------------

- Sébastien Alix <[email protected]>
- Duc, Dao Dong <[email protected]>
(https://komit-consulting.com)
- Jean-Charles Drubay <[email protected]>
(https://komit-consulting.com)
- Alan Ramos <[email protected]> (https://www.jarsa.com.mx)
- Harald Panten <[email protected]>
- Kevin Khao <[email protected]>
- Tatiana Deribina <[email protected]> (https://sprintit.fi)
- Guillem Casassas <[email protected]>
- Guillaume Pothier <[email protected]>

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

Other credits
-------------

Images
~~~~~~

- Oxygen Team:
`Icon <http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-user-group-new-icon.html>`__
(LGPL)

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-sebalix| image:: https://github.com/sebalix.png?size=40px
:target: https://github.com/sebalix
:alt: sebalix
.. |maintainer-jcdrubay| image:: https://github.com/jcdrubay.png?size=40px
:target: https://github.com/jcdrubay
:alt: jcdrubay
.. |maintainer-novawish| image:: https://github.com/novawish.png?size=40px
:target: https://github.com/novawish
:alt: novawish

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

|maintainer-sebalix| |maintainer-jcdrubay| |maintainer-novawish|

This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/17.0/base_user_role>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions base_user_role/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
26 changes: 26 additions & 0 deletions base_user_role/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2014 ABF OSIELL <http://osiell.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).


{
"name": "User roles",
"version": "17.0.1.0.0",
"category": "Tools",
"author": "ABF OSIELL, Odoo Community Association (OCA)",
"license": "LGPL-3",
"development_status": "Production/Stable",
"maintainers": ["sebalix", "jcdrubay", "novawish"],
"website": "https://github.com/OCA/server-backend",
"depends": ["base"],
"data": [
"security/ir.model.access.csv",
"data/ir_cron.xml",
"data/ir_module_category.xml",
"views/role.xml",
"views/user.xml",
"views/group.xml",
"wizards/create_from_user.xml",
"wizards/wizard_groups_into_role.xml",
],
"installable": True,
}
17 changes: 17 additions & 0 deletions base_user_role/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 ABF OSIELL <http://osiell.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
-->
<odoo noupdate="1">
<record model="ir.cron" id="cron_update_users">
<field name='name'>Update user roles</field>
<field name='interval_number'>3</field>
<field name='interval_type'>hours</field>
<field name="numbercall">-1</field>
<field name="active">True</field>
<field name="doall" eval="False" />
<field name="model_id" ref="base_user_role.model_res_users_role" />
<field name="state">code</field>
<field name="code">model.cron_update_users()</field>
</record>
</odoo>
15 changes: 15 additions & 0 deletions base_user_role/data/ir_module_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 ABF OSIELL <http://osiell.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
-->
<odoo>
<!--
This module category aims to be linked to role/group you create in your own
module (field 'res.groups.category_id').
By doing this you'll have the section 'User roles' in the "Access rights" tab
on the user form which will regroup all roles/groups for a better visibility.
-->
<record model="ir.module.category" id="ir_module_category_role">
<field name='name'>User roles</field>
</record>
</odoo>
Loading
Loading