Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
15028 Zobrazení

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
Zrušit

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

Nejlepší odpověď

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
Zrušit

vote if its helpful my friend :)

Nejlepší odpověď

How to Hide Duplicate Action 

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvn 23
4141
0
říj 17
2468
1
čvc 16
10610
0
bře 15
3655
1
bře 15
7368