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

[18.0][MIG] base_user_role: Migration to version 18.0 #313

Merged
merged 142 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
7f54d56
8.0 - New module 'base_user_role' to manage user roles efficiently (#…
sebalix Dec 9, 2016
d4439e9
base_user_role: display roles as first tab in user form
sbidoul Dec 10, 2016
3df52a1
base_user_role - Set a default category to associated groups
sebalix Dec 10, 2016
575014d
[MIG] base_user_role: Port to 10.0
adrienpeiffer Jan 2, 2017
f983522
[FIX] Crash in base_user_role when role_id is not set on res.users.ro…
alexis-via Jun 12, 2017
29362f1
[10.0][FIX] User group not updating when removing a user from the rol…
benwillig Aug 11, 2017
185d344
[MIG] base_user_role: Migration to 11.0
Nov 19, 2017
1c2d2c6
[FIX+IMP] base_user_role: Several things:
sebalix Sep 21, 2017
3142b9e
[MIG] Update test cases for testing (unlink role and role line) to ne…
Nov 23, 2017
2da61ca
[IMP] Use default user to define default roles to create for a new user
benwillig Oct 12, 2017
fe85d9e
[UPD] Update base_user_role.pot
oca-travis Aug 30, 2018
95c781a
Translated using Weblate (Danish)
hhgabelgaard Aug 30, 2018
da0197b
[MIG] base_user_role: Migration to 12.0
Oct 14, 2018
bcad476
[UPD] README.rst
OCA-git-bot Nov 19, 2018
29d22b6
[UPD] Update base_user_role.pot
oca-travis Nov 19, 2018
14181e7
Update translation files
oca-transbot Nov 25, 2018
1ef3ecf
[UPD] README.rst
OCA-git-bot Dec 2, 2018
6319b5e
[12.0][FIX] readme
HviorForgeFlow Dec 11, 2018
6170a1c
[UPD] README.rst
OCA-git-bot Feb 11, 2019
134c1e7
[MIG] base_import_match: Migration to 12.0
ernestotejeda Feb 8, 2019
48b77b2
[base_user_role] improve performance by only adding/removing from a user
JordiBForgeFlow Jan 2, 2019
495553d
[UPD] README.rst
OCA-git-bot Jul 29, 2019
c3c8825
[10.0][UPD] base_user_role: Disabled Administrator user selection in …
artux404 Jun 12, 2018
fc34701
Switch AGPL to LGPL license
elicoidal Dec 29, 2018
ce61293
Revert "[FIX] Crash in base_user_role when role_id is not set on res.…
Jan 29, 2019
8cdda85
Make user_id and role_id required in base_user_role_line
Jan 29, 2019
9bf77f5
[IMP] make base_user_role_line company dependent
Jan 29, 2019
155a70e
FIX check_company
Feb 14, 2019
10bcb1d
[MIG] base_user_role: Migration to 13.0
sebalix Oct 1, 2019
a67a8aa
[IMP] base_user_role: black, isort
sebalix Dec 16, 2019
5444c68
[UPD] Update base_user_role.pot
oca-travis Jan 30, 2020
24edfb5
[UPD] README.rst
OCA-git-bot Jan 30, 2020
66de1c6
Update translation files
oca-transbot Jan 31, 2020
fd2fd73
Translated using Weblate (Spanish (Mexico))
alan196 Feb 15, 2020
c8ce88b
pre-commit update
OCA-git-bot Mar 14, 2020
2b7ac44
Translated using Weblate (French)
houzefa-abba Sep 28, 2020
324fe8d
[MIG] base_user_role: Migration to 14.0
alan196 Oct 12, 2020
4d6f35c
[UPD] Update base_user_role.pot
oca-travis Dec 16, 2020
1bc5a8a
[IMP] Fix edition of role
sebastienbeau Dec 20, 2020
340e5a9
[IMP] base_user_role: Adding a new tab for user comments in roles form.
HaraldPanten Dec 21, 2020
79e5d26
[UPD] Update base_user_role.pot
oca-travis Dec 30, 2020
d93edda
[UPD] README.rst
OCA-git-bot Dec 30, 2020
0c2d048
base_user_role 14.0.1.1.0
OCA-git-bot Dec 30, 2020
b67831c
Update translation files
oca-transbot Dec 30, 2020
56b6005
[FIX] base_user_role: remove multicompany functionality
kevinkhao Jan 25, 2021
9bbfd1e
[UPD] Update base_user_role.pot
oca-travis Jan 27, 2021
dfd147f
base_user_role 14.0.2.0.0
OCA-git-bot Jan 27, 2021
d7940fc
Update translation files
oca-transbot Jan 27, 2021
1ebf5aa
[IMP] base_user_role: UX improvements
kevinkhao Jan 25, 2021
fec8f00
[UPD] Update base_user_role.pot
oca-travis Jan 28, 2021
2e93f24
[UPD] README.rst
OCA-git-bot Jan 28, 2021
c03c7de
base_user_role 14.0.2.1.0
OCA-git-bot Jan 28, 2021
0f7eaaa
Update translation files
oca-transbot Jan 28, 2021
92c15d0
base_user_role 14.0.2.1.1
OCA-git-bot Feb 12, 2021
47d212a
Translated using Weblate (Spanish)
anasuarez1 Mar 16, 2021
13f793c
Translated using Weblate (Vietnamese)
minhdc Sep 25, 2021
bcd732d
[MIG] base_user_role: Migration to 15.0
Nov 11, 2021
1a1cb69
[UPD] Update base_user_role.pot
Nov 27, 2021
3b43fd3
[UPD] README.rst
OCA-git-bot Nov 27, 2021
04192b5
Translated using Weblate (Catalan)
pablontura Apr 13, 2022
6619cd3
FIX base_user_role: use ``sudo()`` in ``user_ids`` compute
SilvioC2C May 26, 2022
bd8e282
FIX base_user_role: update tests
SilvioC2C May 26, 2022
ef316fa
[IMP]base_user_role: Groups-roles navigation
GuillemCForgeFlow Apr 19, 2022
3d31c00
[UPD] Update base_user_role.pot
Jun 20, 2022
af1ba2e
[UPD] README.rst
OCA-git-bot Jun 20, 2022
dd6ac2c
base_user_role 15.0.0.1.0
OCA-git-bot Jun 20, 2022
ed5a238
Update translation files
oca-transbot Jun 20, 2022
4cee410
[15.0][FIX] UserWarning: Field res.groups.trans_parent_ids should be …
elmeriniemela Jul 11, 2022
add0c02
[FIX] base_user_role: tests - include `trans_implied_ids`
kirca Aug 8, 2022
7c67472
base_user_role 15.0.0.1.1
OCA-git-bot Aug 11, 2022
b1cd7ff
[FIX] base_user_role: text on role Internal Notes was not saved
dreispt Jan 31, 2022
d2f2794
[13.0][FIX]base_user_role: Add compute_sudo
GuillemCForgeFlow Apr 26, 2022
1f162b8
[13.0][FIX]base_user_role: Show active users on Users page
GuillemCForgeFlow May 25, 2022
6d66028
[UPD] Update base_user_role.pot
Aug 11, 2022
ce199ee
base_user_role 15.0.0.2.0
OCA-git-bot Aug 11, 2022
896c812
Update translation files
oca-transbot Aug 11, 2022
60caa5e
base_user_role 15.0.0.2.1
OCA-git-bot Aug 11, 2022
7f8a4dd
[IMP] base_user_role: black, isort, prettier
apineux Aug 16, 2022
33d7c82
[MIG] base_user_role: Migration to 16.0
apineux Aug 16, 2022
b6980c8
[UPD] Update base_user_role.pot
Oct 18, 2022
2131f1f
[UPD] README.rst
OCA-git-bot Oct 18, 2022
49592e0
[IMP] base_user_role show rules and access
Kev-Roche Jun 27, 2022
8bfa478
Update translation files
weblate Oct 18, 2022
02a6fae
[UPD] Update base_user_role.pot
Oct 20, 2022
35bf45d
base_user_role 16.0.1.1.0
OCA-git-bot Oct 20, 2022
7bec868
Update translation files
weblate Oct 20, 2022
00a2c2e
[DOC] base_user_role: set development status to 'Production/Stable'
sebalix Oct 18, 2022
92f82c5
[UPD] README.rst
OCA-git-bot Oct 20, 2022
449ccdf
base_user_role 16.0.1.1.1
OCA-git-bot Oct 20, 2022
28f8c73
[UPD] Update base_user_role.pot
Jan 26, 2023
f29890b
Update translation files
weblate Jan 26, 2023
e536c0d
Add "Create role from user" feature
gpothier Jun 20, 2023
68a1fb4
Fix formatting according to pre-commit hook
gpothier Jun 21, 2023
4edcabf
Make name field required
gpothier Jun 21, 2023
8039697
Simplify wizard name
gpothier Jun 21, 2023
99821f2
Undo changes to README and put them in the files in the readme direct…
gpothier Jun 21, 2023
5b1d102
Fix model name change in views
gpothier Jun 21, 2023
b7ed210
Add test for the create role from user wizard
gpothier Jun 21, 2023
5921ddf
Use kwargs in with_context, as per pre-commit recommendation
gpothier Jun 21, 2023
53021b7
Translated using Weblate (Italian)
francesco-ooops Jun 22, 2023
d208de8
[UPD] Update base_user_role.pot
Jun 24, 2023
b1d2c16
[UPD] README.rst
OCA-git-bot Jun 24, 2023
dc8ef2d
base_user_role 16.0.1.2.0
OCA-git-bot Jun 24, 2023
8d09691
Update translation files
weblate Jun 24, 2023
8e54611
[FIX] base_user_role: filter domain for user role search
JordiMForgeFlow Jul 6, 2023
92c16d4
base_user_role 16.0.1.2.1
OCA-git-bot Jul 10, 2023
a8758d7
Translated using Weblate (Italian)
francesco-ooops Jul 11, 2023
37b1d71
Translated using Weblate (French)
ypapouin Jul 17, 2023
325ccbb
Translated using Weblate (Spanish)
Ivorra78 Aug 25, 2023
a195d94
Translated using Weblate (Spanish)
kikopeiro Aug 28, 2023
4a44d63
Translated using Weblate (Portuguese)
pedrocs-exo Aug 31, 2023
ab956ae
[UPD] README.rst
OCA-git-bot Sep 3, 2023
d088592
Translated using Weblate (Italian)
francesco-ooops Sep 7, 2023
3ba4eaa
base_user_role - add (copy) in order to allow the duplicate
jdidderen-noviat Sep 11, 2023
dfeb556
[UPD] Update base_user_role.pot
Sep 11, 2023
1aa78b4
base_user_role 16.0.1.2.2
OCA-git-bot Sep 11, 2023
a1456ee
[UPD] README.rst
OCA-git-bot Sep 11, 2023
7065d36
Update translation files
weblate Sep 20, 2023
31b5957
Translated using Weblate (Spanish)
Ivorra78 Oct 3, 2023
d0e2ef8
[IMP] base_user_role: pre-commit stuff
rven Dec 13, 2023
e613f57
[MIG] base_user_role: Migration to 17.0
rven Dec 13, 2023
c4dbfa0
[15.0][IMP] base_user_role: Add role_ids column to tree view.
amh-mw Nov 15, 2023
a5abf9e
[15.0][IMP] base_user_role: action to group groups into a role
ArnauCForgeFlow Jan 26, 2024
d950b1b
[UPD] Update base_user_role.pot
Feb 9, 2024
603f56c
[BOT] post-merge updates
OCA-git-bot Feb 9, 2024
ccc3817
Update translation files
weblate Feb 9, 2024
4888ad6
Translated using Weblate (Spanish)
Ivorra78 Feb 14, 2024
71c5604
Translated using Weblate (Italian)
mymage Feb 15, 2024
b2c0ac4
Translated using Weblate (Italian)
mymage Mar 6, 2024
029dc9c
[FIX] base_user_role: Set group on access_wizard_groups_into_role
hwangh95 Apr 4, 2024
9359f57
[BOT] post-merge updates
OCA-git-bot Apr 9, 2024
45dc547
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
795eb44
[IMP] base_user_role: Adding alert in user when role is used
jesusramoneda Jun 7, 2023
7b03a07
[UPD] Update base_user_role.pot
Jul 10, 2024
885d634
[BOT] post-merge updates
OCA-git-bot Jul 10, 2024
8db4128
Update translation files
weblate Jul 10, 2024
e2ee5d8
Translated using Weblate (Italian)
mymage Jul 15, 2024
efb7791
[FIX] base_user_role: prevent crash when using 'res.users' (x2m) fiel…
Jul 29, 2024
0fceb49
[BOT] post-merge updates
OCA-git-bot Jul 31, 2024
7acd964
[IMP] base_user_role: pre-commit stuff
BertVGroenendael Oct 21, 2024
9cdb798
[IMP] base_user_role: pre-commit stuff
BertVGroenendael Oct 21, 2024
8f26ebb
[18.0][MIG] base_user_role
BertVGroenendael Oct 21, 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:520f0004fbbd2497fb88fee2dec11dae6962894d4084b704724ff2fe695a5f30
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.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-18-0/server-backend-18-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=18.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:%2018.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 <sebastien.alix@camptocamp.com>
- Duc, Dao Dong <duc.dd@komit-consulting.com>
(https://komit-consulting.com)
- Jean-Charles Drubay <jc@komit-consulting.com>
(https://komit-consulting.com)
- Alan Ramos <alan.ramos@jarsa.com.mx> (https://www.jarsa.com.mx)
- Harald Panten <harald.panten@sygel.es>
- Kevin Khao <kevin.khao@akretion.com>
- Tatiana Deribina <tatiana.deribina@sprintit.fi> (https://sprintit.fi)
- Guillem Casassas <guillem.casassas@forgeflow.com>
- Guillaume Pothier <gpothier@caligrafix.cl>

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/18.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": "18.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,
}
15 changes: 15 additions & 0 deletions base_user_role/data/ir_cron.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 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="active">True</field>
<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