Reputation: 21188
How can I inherit multiple access rights groups? When I inherit one group, it works fine, but I need to inherit from different hierarchies of groups. For example imagine this hierarchy:
high_lvl_grp 'inherits' -> mid_lvl_grp 'inherits' -> low_lvl_grp
high_lvl_grp 'inherits' -> another_specific_group
So I need that high_lvl_grp
would inherit both mid_lvl_grp
and another_specific_group
, but those two groups are not related, because they are not in the same hierachy, so I can't inherit only one group. I tried to write something like this:
<record id="high_lvl_grp" model="res.groups">
<field name="name">High Level Group</field>
<field name="implied_ids" eval="['&',(4, ref('mid_lvl_grp'), (4, ref('another_specific_group')))]"/>
</record>
But it does not work, it still inherits only first group, which is mid_lvl_grp
. Also I don't understand what does that number mean inside eval
attribute, which in source code I always see is four?
Upvotes: 0
Views: 2167
Reputation: 11141
try this, for example we use module sale and stock. Gives rights of Sale Manager and Stock User. It's works for me.
<field name="implied_ids" eval="[(4, ref('base.group_sale_manager')), (4, ref('stock.group_stock_user'))]"/>
Hopes this will help you.
Upvotes: 1