How to hide an options from ‘More’ button?

Hello everyone. In this post tutorial, we will learn how to hide options from ‘More’ drop-down in Odoo10 and Odoo10-Enterprise.

1) Take an example ‘Invoice Order’ in sale order tree:

hide invoice

To delete this option, create a function that fetch record using xml id and call unlink method to delete records with given ids.

XML File:
xml

Python File:

code

apres

2) Duplicate button
As ‘duplicate’ button often produce inconveniences when modules don’t correctly handle this option. Is there a way to hide a duplicate?

duplicate
For this version is not possible to hide the duplicate link, the only possibility is to override  a copy method that a warning message.

Here is an example:

copy

What am I missing here? Let me know in the comments and I’ll add it in 😉.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s