IMPL calls super in group_backend res_users compute_share

FIX applies pre-commit
IMPL adds test for share of backend user
FIX pre-commit pass
IMPL removes mail.activity.mixin from dummy model because it is not needed for the test
IMPL renames and divide the base_group_backend into 2 groups one that provide the basic rights and another that allow login in the app
IMPL changes backend ui users to a user type
FIX pre-commit pass
FIX removes useless imports
FIX adds share to group_backend_ui_users
IMPL adds mail_channel to access rights
FIX tests now working
FIX pre-commit pass
This commit is contained in:
Francois Poizat
2023-08-17 14:38:52 +02:00
committed by David Beal
parent 48a8d4eec1
commit 93eafb5001
17 changed files with 182 additions and 71 deletions

View File

@@ -0,0 +1,8 @@
<odoo>
<record model="ir.ui.menu" id="base.menu_management">
<!-- Allow to avoid to display App menu for backend users -->
<field name="groups_id" eval="[(4, ref('base.group_user'), 0)]" />
</record>
</odoo>

View File

@@ -1,18 +0,0 @@
<odoo>
<record model="res.groups" id="group_backend">
<field name="name">Backend user</field>
<field name="category_id" ref="base.module_category_user_type" />
<field name="comment">
This group is used to gives user backend access.
While users in `base.group_user` gets a lot of default access
which makes hard to define properly records/rules/menu access.
So for maintainability you shouldn't linked any access right, rules,
menu, and so on to this group directly.
The only intent of this groups is to be able to get a session
to Odoo backend (`/web`).
</field>
</record>
</odoo>

View File

@@ -0,0 +1,43 @@
<odoo>
<record model="res.groups" id="base_group_backend">
<field name="name">Backend user</field>
<field name="category_id" ref="base.module_category_user_type" />
<field name="comment">
This group is used to gives user backend access.
While users in `base.group_user` gets a lot of default access
which makes hard to define properly records/rules/menu access.
So for maintainability you shouldn't linked any access right, rules,
menu, and so on to this group directly.
The only intent of this groups is to be able to get a session
to Odoo backend (`/web`).
</field>
</record>
<record model="res.groups" id="group_backend_ui_users">
<field name="name">Backend UI user</field>
<field name="category_id" ref="base.module_category_user_type" />
<field name="comment">
This group is used to gives user basic ui access.
</field>
<field
name="rule_groups"
eval="[
(6, 0,[
ref('base.ir_default_user_rule'),
ref('base.ir_filters_delete_own_rule'),
ref('base.ir_filters_employee_rule'),
ref('base.res_company_rule_employee'),
ref('mail.ir_rule_mail_notifications_group_user'),
ref('mail.ir_rule_mail_channel_member_group_user'),
ref('mail.mail_activity_rule_user'),
ref('mail.mail_channel_rule'),
]),
]"
/>
</record>
</odoo>