Skip to Content
Menu
This question has been flagged
2 Replies
4089 Views

Hi

I have created a rule in my security folder but i want to display this rule only for certain groupe, how i can make that ?

I have tried to insert the group name inside the rule definition, but it don't working :

<record model="ir.module.category" id="module_category_affichage" groups="affichage.group_information_distributeur">
<field name="name">Captures Gestion</field>
<field name="sequence">5</field>
</record>
Avatar
Discard
Author Best Answer

Thank you Niyas, i have tried it, but it doesn't working for me.

I want to filter the name of groups in the user menu .;..

Avatar
Discard
Best Answer

Hi,

For adding the groups for a record rule you can check with this example,

<record id="portal_stock_picking_portal_user_rule" model="ir.rule">
<field name="name">Portal Follower Pickings</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="domain_force">['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
Avatar
Discard