I have some custom code which should only be available for a specific user group. This is triggered by an action trough the 'more' button in the listview.
Is there a way to add a group to this action so it is only visible for the right user group?
Exemple code:
<record id="generate_invoices_action" model="ir.actions.server">
<field name="name">Generate invoices</field>
<field name="model_id" ref="model_my_model"/>
<field name="state">code</field>
<field name="code">
if env.context.get('active_ids'):model.browse(context['active_ids']).generate_invoices()
</field>
</record>
<record id="generate_invoices" model="ir.values">
<field name="name">generate_invoices</field>
<field name="model">my.model</field>
<field name="key">action</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.server,%d'%generate_invoices_action"/>
</record>