Skip to Content
Menu
This question has been flagged
3 Replies
14454 Views

I needed to hide the 'duplicate' option for a specific object. I resolved this programmatically by inheriting the 'copy' method as follows: 

 def copy(self, cr, uid, id, default=None, context=None): 
raise osv.except_osv(_('Warning!'),_("Duplicate is not allowed"))

I need to enhance this by hiding this options from the 'more' options button, how can I do that? 

======

After I did my solution, I checked again and found this link, I followed the same reasoning.  But I need a solution by using groups and rules similar to this one, this is more elegant.

Avatar
Discard

The Dynamic Duplicate Menu Hider for Odoo 17 is an essential tool for enhancing your Odoo instance's user interface by dynamically managing the visibility of the duplicate action menu button in both list (tree) and form views. This app allows administrators to configure the visibility of the duplicate action menu button based on user groups and specific model configurations, ensuring a streamlined and customized user experience. With an easy-to-use configuration panel, you can quickly toggle the visibility of the duplicate menu for selected models, empowering you to maintain a cleaner and more controlled interface. Integration is achieved through the use of the js_class attribute in both list (tree) and form views.
https://www.youtube.com/watch?v=VbZ0tptaq0Y

Best Answer

Why dont you try this option:

<form string="Supplier Invoice" duplicate="false" version="7.0">

Those links will be useful for you my friend:

https://www.odoo.com/fr_FR/forum/help-1/question/remove-duplicate-link-from-more-dropdown-in-form-view-40601

http://openerp-community.2306076.n4.nabble.com/Openerp-community-web-hide-duplicate-module-td4645297.html

Regards


Avatar
Discard

vote if its helpful my friend :)

Best Answer

How to Hide Duplicate Action 

https://www.youtube.com/watch?v=IoiailfpSFg

Avatar
Discard
Best Answer

Take a look at this blog 

How to hide an options from 'More' button?
 
https://odooforbeginnersblog.wordpress.com/2017/06/11/how-to-hide-an-options-in-more-button/
Avatar
Discard
Related Posts Replies Views Activity
2
Jun 23
3943
0
Oct 17
2306
1
Jul 16
10326
0
Mar 15
3471
1
Mar 15
7141