Skip to Content
Menu
This question has been flagged
1 Reply
2196 Views

Hello

i want to add groups to module maintenance in odoo 10

is it possible to add groups like : maintenance/manager, maintenance/user like other modules mrp stock ...

thanks

Avatar
Discard

Group and Access Rights in odoo: https://goo.gl/4jAhtH

Best Answer

Hi,

Yes possible to do it. Either from the code or you can do it from the front end. By default in the maintenance module, there is a group, ie, Equipment Manager, which comes under the Human Resource Category


For creating a new category and group, see below code,


<record model="ir.module.category" id="module_maintenance_management">
<field name="name">Maintenance</field>
<field name="sequence">12</field>
</record>

<record id="group_maintenance_user" model="res.groups">
<field name="name">Maintenance User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="module_maintenance_management"/>
</record>

<record id="group_maintenance_manager" model="res.groups">
<field name="name">Maintenance Manager</field>
<field name="category_id" ref="module_maintenance_management"/>
<field name="implied_ids" eval="[(4, ref('group_maintenance_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>


Once you create the groups, you have to right the record rules and access rights accordingly.


Thanks

Avatar
Discard
Author

do you have an examples

thanks

Author

thanks

Author

thanks

Related Posts Replies Views Activity
0
Aug 22
893
1
Jul 22
17728
0
Apr 22
1607
3
Sep 21
1907
2
Sep 21
3204