Odoo Help

3
1 Answer
7
Avatar

Vasiliy Birukov

--Vasiliy Birukov--
3591
| 7 6 8
Togliatty, Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
3/28/13, 1:43 AM

Yes it is strange behavior. If you inherit group one by one, then it will be in list (like roles). But if you have standalone at least one, then it will be like options. It cause impossible define exclusive roles.

If you need middle level, for example "Project/Specialist", then you need inherit Specialist from User and Manager inherit from Specialist.

<record id="group_xxx_user" model="res.groups">
    <field name="name">User</field>
    <field name="category_id" ref="module_category_yyy"/>
</record>

<record id="group_xxx_specialist" model="res.groups">
    <field name="name">Specialist</field>
    <field name="category_id" ref="module_category_yyy"/>
    <field name="implied_ids" eval="[(4, ref('group_xxx_user'))]"/>
</record>

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

, where xxx - name of module, yyy - name of category.

Or define it through web interface: "Settings/Users/Groups/Inherited"

1 Comment
Aron Lorincz
10/29/15, 2:10 PM

It's extremely useful, thanks. For those who don't understand it for the first read (like me): if you use a dropdown like Vasily suggested, a dropdown item will make the user the member off all groups ABOVE that group too! So this's why it's impossible to define exclusive roles.

Ask a Question
Tags
Keep Informed
0 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now