Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I hide the 'duplicate' option in the 'more' button for a specific object

By
Tarek Mohamed Ibrahim
on 9/4/15, 4:22 AM 1,196 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.

-1

Drees Far

--Drees Far--
1130
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 9/7/15, 3:57 PM

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


vote if its helpful my friend :)

Drees Far
on 9/7/15, 3:57 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/4/15, 4:22 AM
Seen: 1196 times
Last updated: 9/7/15, 10:44 PM