Reputation: 56660
I'm trying to write a module for OpenERP 6.1 that will hide the "Send an SMS" button on the Partner form. I tried overwriting the window action's id with a different name
and src_model
, but only the name change appeared. I traced through the code, and it looks like the ir_values
records from the base module are still linking the action to the res.partner
model.
Is there a legitimate way to hide a sidebar button, or am I going to have to modify the base module? I briefly tried restricting permissions on the wizard's table, but that didn't seem to have an effect.
Upvotes: 3
Views: 1846
Reputation: 3743
Just add multi="True" on .
This allows to hide the action in form view but you can use it from "action" gear icon in menu.
<act_window id="action_partner_sms_send"
name="Send an SMS"
res_model="partner.sms.send"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
multi="True"/>
Reference: https://lists.launchpad.net/openerp-dev/msg00012.html
Thank you.
Upvotes: 1
Reputation: 3743
Just try the <delete>
tag, it works for XML as well as YAML. You can delete a specific record by its XML id, or use search criteria.
<delete model="ir.actions.act_window" id="other_module.action_id"/>
Upvotes: 2
Reputation: 5044
Please try by creating a new group and provide this group to your button/link and don't add this group to any user.
Upvotes: 0
Reputation: 13342
Go to the "Settings" module:
Upvotes: 1
Reputation: 116
In the view for the window add
multi="False"
<act_window name="Invoice Membership"
res_model="membership.invoice"
src_model="res.partner"
multi="False"
key2="client_action_multi"
view_mode="form"
id="action_membership_invoice_view"/>
Upvotes: 1