This question has been flagged
3 Replies
8123 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>

Avatar
Discard
Author Best Answer

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.


 




Avatar
Discard
Best Answer

Hi there, you should to set group 2 inherit group 1 like this, and you need to uninstall your addons and install it again. that's it and hopy it works for you.




Avatar
Discard
Best Answer


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

Avatar
Discard
Author

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

1 include this field ...put your sequence number.and check user>>edit , it will have your groups.

pls let me know how much out put you got

Author

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

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

Author

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.