From 3cbb632748cbc5f7230e67d97cf8823cc0d24851 Mon Sep 17 00:00:00 2001 From: Duc Dao Date: Sun, 14 Oct 2018 23:57:07 +0700 Subject: [PATCH] [MIG] base_user_role: Migration to 12.0 --- base_user_role/README.rst | 52 ------------------ base_user_role/__manifest__.py | 5 +- base_user_role/models/role.py | 12 ++-- base_user_role/readme/CONFIGURE.rst | 18 ++++++ base_user_role/readme/CONTRIBUTORS.rst | 5 ++ base_user_role/readme/CREDITS.rst | 4 ++ base_user_role/readme/DESCRIPTION.rst | 19 +++++++ base_user_role/readme/ROADMAP.rst | 4 ++ base_user_role/readme/USAGE.rst | 13 +++++ .../static/description/user_form.png | Bin 0 -> 22743 bytes base_user_role/tests/test_user_role.py | 5 +- 11 files changed, 76 insertions(+), 61 deletions(-) create mode 100644 base_user_role/readme/CONFIGURE.rst create mode 100644 base_user_role/readme/CONTRIBUTORS.rst create mode 100644 base_user_role/readme/CREDITS.rst create mode 100644 base_user_role/readme/DESCRIPTION.rst create mode 100644 base_user_role/readme/ROADMAP.rst create mode 100644 base_user_role/readme/USAGE.rst create mode 100644 base_user_role/static/description/user_form.png diff --git a/base_user_role/README.rst b/base_user_role/README.rst index 215f9a641..ebe82ee3d 100644 --- a/base_user_role/README.rst +++ b/base_user_role/README.rst @@ -6,71 +6,19 @@ User roles ========== -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. - Configuration ============= -To configure this module, you need to go to *Configuration / 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: - -.. image:: /base_user_role/static/description/roles.png - -Add groups: - -.. image:: /base_user_role/static/description/role_groups.png - -Add users (with dates or not): - -.. image:: /base_user_role/static/description/role_users.png - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smash it by providing detailed and welcomed feedback. Credits ======= -Images ------- - -* Oxygen Team: `Icon `_ (LGPL) - Contributors ------------ -* Sébastien Alix -* Duc, Dao Dong (https://komit-consulting.com) - -Do not contact contributors directly about support or help with technical issues. Maintainer ---------- diff --git a/base_user_role/__manifest__.py b/base_user_role/__manifest__.py index 6ee7c64fd..2d2173d13 100644 --- a/base_user_role/__manifest__.py +++ b/base_user_role/__manifest__.py @@ -3,11 +3,11 @@ { 'name': 'User roles', - 'version': '11.0.1.0.1', + 'version': '12.0.1.0.0', 'category': 'Tools', 'author': 'ABF OSIELL, Odoo Community Association (OCA)', 'license': 'AGPL-3', - 'maintainer': 'ABF OSIELL', + 'maintainers': ['ABF OSIELL', 'jcdrubay'], 'website': 'http://www.osiell.com', 'depends': [ 'base', @@ -20,5 +20,4 @@ 'views/user.xml', ], 'installable': True, - 'auto_install': False, } diff --git a/base_user_role/models/role.py b/base_user_role/models/role.py index 500863ee0..cf0611780 100644 --- a/base_user_role/models/role.py +++ b/base_user_role/models/role.py @@ -19,14 +19,16 @@ class ResUsersRole(models.Model): readonly=True, string="Associated group") line_ids = fields.One2many( comodel_name='res.users.role.line', - inverse_name='role_id', string="Users") + inverse_name='role_id', string="Role lines") user_ids = fields.One2many( - comodel_name='res.users', string="Users", + comodel_name='res.users', string="Users list", compute='_compute_user_ids') group_category_id = fields.Many2one( related='group_id.category_id', default=lambda cls: cls.env.ref( - 'base_user_role.ir_module_category_role').id) + 'base_user_role.ir_module_category_role').id, + string="Associated category", + help="Associated group's category") @api.multi @api.depends('line_ids.user_id') @@ -86,11 +88,11 @@ class ResUsersRoleLine(models.Model): for role_line in self: role_line.is_enabled = True if role_line.date_from: - date_from = fields.Date.from_string(role_line.date_from) + date_from = role_line.date_from if date_from > today: role_line.is_enabled = False if role_line.date_to: - date_to = fields.Date.from_string(role_line.date_to) + date_to = role_line.date_to if today > date_to: role_line.is_enabled = False diff --git a/base_user_role/readme/CONFIGURE.rst b/base_user_role/readme/CONFIGURE.rst new file mode 100644 index 000000000..1a6be35a4 --- /dev/null +++ b/base_user_role/readme/CONFIGURE.rst @@ -0,0 +1,18 @@ +To configure this module, you need to go to *Configuration / 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: + +.. image:: /base_user_role/static/description/roles.png + +Add groups: + +.. image:: /base_user_role/static/description/role_groups.png + +Add users (with dates or not): + +.. image:: /base_user_role/static/description/role_users.png diff --git a/base_user_role/readme/CONTRIBUTORS.rst b/base_user_role/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..4510b4131 --- /dev/null +++ b/base_user_role/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Sébastien Alix +* Duc, Dao Dong (https://komit-consulting.com) +* Jean-Charles Drubay (https://komit-consulting.com) + +Do not contact contributors directly about support or help with technical issues. diff --git a/base_user_role/readme/CREDITS.rst b/base_user_role/readme/CREDITS.rst new file mode 100644 index 000000000..e44089144 --- /dev/null +++ b/base_user_role/readme/CREDITS.rst @@ -0,0 +1,4 @@ +Images +------ + +* Oxygen Team: `Icon `_ (LGPL) diff --git a/base_user_role/readme/DESCRIPTION.rst b/base_user_role/readme/DESCRIPTION.rst new file mode 100644 index 000000000..70f941970 --- /dev/null +++ b/base_user_role/readme/DESCRIPTION.rst @@ -0,0 +1,19 @@ +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. diff --git a/base_user_role/readme/ROADMAP.rst b/base_user_role/readme/ROADMAP.rst new file mode 100644 index 000000000..ec0960b62 --- /dev/null +++ b/base_user_role/readme/ROADMAP.rst @@ -0,0 +1,4 @@ +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. diff --git a/base_user_role/readme/USAGE.rst b/base_user_role/readme/USAGE.rst new file mode 100644 index 000000000..34a2fe1fd --- /dev/null +++ b/base_user_role/readme/USAGE.rst @@ -0,0 +1,13 @@ +[ This file must be present and contains the usage instructions + for end-users. As all other rst files included in the README, + it MUST NOT contain reStructuredText sections + only body text (paragraphs, lists, tables, etc). Should you need + a more elaborate structure to explain the addon, please create a + Sphinx documentation (which may include this file as a "quick start" + section). ] + +To use this module, you need to: + +#. Go to Configuration / Users / Users choose user and set Roles: + +.. image:: /base_user_role/static/description/user_form.png diff --git a/base_user_role/static/description/user_form.png b/base_user_role/static/description/user_form.png new file mode 100644 index 0000000000000000000000000000000000000000..78e6a1cf8b16169ba8a9fe31e85d680d23584667 GIT binary patch literal 22743 zcmbrmcRXBA^f!L7SS%JHDZTcW3UMb7#(+IrBbcM5?PQP?Fyu2LOOlNfG%R0Elb> zfZ#cp5MQ&!_I?0=BXWME^a2b9&n&3@#1|P|2F1&od9JGS|_^tl#WSz}0_eSH-ftvKH#Ku}->cq-j<7bh{ zeMy{=iX@)2tNQ92ij}-U90GHSbEhLK8#VJRg*sp;%tV$}Kd1h=!o_0doC274Lf_lg z*c|9HrIkgX!140zlG1+X;sG9#(w>=$>`2o!YgLJCuUk?RCja|teIC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M;3!q?VvAl9|al}amtC5`sQ9q#27R4RU zZW});E}lPFmN02X&>-NYa!qayEv%zsh0QN&IW$9YhNd{9`!X5toqZOt-ClZH>RAtF zd}*}IGxcsFLXM+h-{0l7MJ*~<~@UTA)NIjRxB z0OUG3-+F+-Zig`Vsl`&(1cFxs%r796RMx#2zRv8 zebjgOgS)$u|G5(72;0vmhFV<64i>G6(yyw`()$Egam?~mh`ReIgc(~X1a~- zn~(%rmSuh5ujKvXR>!hxm*PEY(|)$q8a~x7n_+poG4M#k&tr!J#~oQcG$X>Ksq)p) zE9&axO7E6ITLDW$tLHu->RL_D1|Cc+&ZGu=;^z&Af#kET5;O$!T)&mw#2B5Xw!`62B}`B(rToQk-aqJSA~ zUyuW_{Ax9vF;`o=yE~nI=1<3LzMvT@NM*?7(>t=n9IvPpb^R2FIm2E39Sfe{rwRT{{x9v}{eM7MAvxyi>)C@s+Pft^f^~oYD;=(Na zoy99W_s^a5|K_Gg*AN(M$NH|3JQMPng?&mnY#AymNsRRQH+nl+M!x$uc1 NCeWLZ^6Pi*{~JV{E>{2m literal 0 HcmV?d00001 diff --git a/base_user_role/tests/test_user_role.py b/base_user_role/tests/test_user_role.py index 18535ea3f..0b1ae08b3 100644 --- a/base_user_role/tests/test_user_role.py +++ b/base_user_role/tests/test_user_role.py @@ -28,13 +28,16 @@ class TestUserRole(TransactionCase): self.role1_id = self.role_model.create(vals) # ROLE_2 + # Must have group_user in order to have sufficient groups. Check: + # github.com/odoo/odoo/commit/c3717f3018ce0571aa41f70da4262cc946d883b4 self.group_multi_currency_id = self.env.ref( 'base.group_multi_currency') self.group_settings_id = self.env.ref('base.group_system') vals = { 'name': "ROLE_2", 'implied_ids': [ - (6, 0, [self.group_multi_currency_id.id, + (6, 0, [self.group_user_id.id, + self.group_multi_currency_id.id, self.group_settings_id.id])], } self.role2_id = self.role_model.create(vals)