Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
15039 Vistas

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
Descartar

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

Mejor respuesta

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
Descartar

vote if its helpful my friend :)

Mejor respuesta

How to Hide Duplicate Action 

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

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 23
4154
0
oct 17
2471
1
jul 16
10614
0
mar 15
3663
1
mar 15
7375