İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
15077 Görünümler

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
Vazgeç

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

En İyi Yanıt

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
Vazgeç

vote if its helpful my friend :)

En İyi Yanıt

How to Hide Duplicate Action 

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

Avatar
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Haz 23
4179
0
Eki 17
2479
1
Tem 16
10649
0
Mar 15
3684
1
Mar 15
7378