Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
10059 Lượt xem

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>

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.


 




Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.




Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất


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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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

Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 24
1828
2
thg 9 21
2674
0
thg 2 21
4655
1
thg 6 16
4701
3
thg 7 25
6891