跳至內容
選單
此問題已被標幟
3 回覆
9997 瀏覽次數

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>

頭像
捨棄
作者 最佳答案

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.


 




頭像
捨棄
最佳答案

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.




頭像
捨棄
最佳答案


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

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

作者

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

作者

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.

相關帖文 回覆 瀏覽次數 活動
1
8月 24
1773
2
9月 21
2637
0
2月 21
4628
1
6月 16
4664
3
7月 25
6718