Odoo Help

Welcome!

This community 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.

1

Selection of User groups for User. [Closed]

By
Gavin Yap
on 7/29/15, 2:17 AM 822 views

Hi,

I've create 2 groups.

        <record id="warranty_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" eval="ref('warranty_application')" />
</record>
<record id="warranty_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" eval="ref('warranty_application')" />
</record>

How do I make it as a selection when assigning the groups for a user as below?


EDIT

I did the following and it doesn't group as well

        <record id="warranty_group_category" model="ir.module.category">
<field name="name">Warranty</field>
<field name="description">Help you managed customre's Warranty Registration</field>
</record>
<record id="warranty_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="warranty_group_category"/>
</record>
<record id="warranty_group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="warranty_group_category"/>
</record>

0
Gavin Yap
On 8/18/15, 8:04 AM

Solution

If multiple roles are created for an Application, and in my case Warranty/Manager and Warranty/User. There must be a hierarchical structure  of inheritance in roles. Example:

User > Power User > Super User

Where > is inherited by.

So the following code, filling the implied_ids, having  Warranty/Manager to inherit Warranty/User.

        <record id="warranty_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="warranty_group_category"/>
<field name="implied_ids" eval="[(6,0,[ref('warranty_group_user')])]"/>
</record>


I'm now able to see Group Selection for my application.


 




0
Abdul wahid
On 7/29/15, 2:40 AM


<record model="ir.module.category" id="commission_my_gourp_category">
<field name="name">Commission</field>
<field name="description">Group Description</field>
<field name="sequence">1</field>
</record>
<record id="my_group" model="res.groups">
<field name="name">commission</field>
<field name="category_id" ref="commission_my_gourp_category"/>
</record>

first u need to create a category. and then reference that category in your group.then group will automatically get displayed in settings>>groups



thanks...

I follow as you've suggested, it does not work as well.

Gavin Yap
on 7/29/15, 3:14 AM
1 include this field ...put your sequence number.and check user>>edit , it will have your groups.
Abdul wahid
on 7/29/15, 4:23 AM

pls let me know how much out put you got

Abdul wahid
on 7/29/15, 4:25 AM

http://imagebin.ca/v/2AH6k4a8sqxG I've add sequence id and still got the above.

Gavin Yap
on 7/30/15, 12:05 AM

i only got the out till that..we can use that user groups from check boxes.... please post the answer here if you solved it, i mean, select from drop down. thank you

Abdul wahid
on 7/30/15, 12:54 AM

Thanks wahid, currently put is aside. Yes I did havecheck boxes, but it does makes sense. What is the purpose I be a user and manager at a same time if I check both boxes. I need to have a role at a time. But I still can't solved this out yet. Nevertheless will post a solution if I ever found one. Thanks.

Gavin Yap
on 8/4/15, 5:07 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/29/15, 2:17 AM
Seen: 822 times
Last updated: 2/2/16, 3:32 AM