Se rendre au contenu
Menu
Cette question a été signalée
6 Réponses
8093 Vues

how can i remove different Actions from specific modules?

e.a. "Send SMS" from Partners or "Share" from Invoices.

we use Odoo V12 Community

ths solutions i found in forum seems to work only in older Odoo versions

Avatar
Ignorer
Meilleure réponse

Hi

You can do it just by adding group into action record

For example by Interface you can do it by access Setting->Technical->Window Actions menu, and search for "Send SMS"

Then you can add some group that granted to access that following action in "Group" tab (picture below)


 

And if you understand to updating record from xml file, surely you can do it so by xml file (for developer user)


For example:

<record model="ir.actions.act_window" id="sms.send_sms_action">
    <field name="groups_id" eval="[(4,ref('base.group_private_addresses'))]" />
</record>


Regards
La Jayuhni Yarsyah

Avatar
Ignorer
Auteur

i could remove the send SMS but with the Share action it does not work (portal.portal_share_action).

Meilleure réponse

I wrote a module 'web_menu_action_if' to accomplish this task in Odoo 9.0.
See my answer to:

https://www.odoo.com/forum/help-1/question/assign-action-menu-item-to-specific-tree-view-112007

Avatar
Ignorer
Auteur Meilleure réponse

@\Dhaval Desai: Your links referr to removing menu items. i want to remove Action-Items in the Action-Dropdown that is on to of most tree views

Avatar
Ignorer
Meilleure réponse

Hello @ jack,

you can see below links:
1.)  https://stackoverflow.com/questions/33908406/remove-or-hide-a-menu-item-in-odoo

2.)  https://odooforbeginnersblog.wordpress.com/2017/02/28/how-to-create-to-hide-a-menu-item-in-odoo/

Thank You.

Avatar
Ignorer