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

deactivating more button

By
claudio candito
on 7/7/14, 11:55 AM 501 views

dear All,

I'd deactivate some features in "more" button, in particular the delete one.

is it possible?

thanks in advance

claudio

 

1

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 7/8/14, 8:53 AM

Yes, but probably not like you think. The delete button is there because the user has the right to delete the object. In the user group these is most likely an access grid line that contains delete="1". If you would set that to 0 the delete button should not appear anymore. The other features are either wizards or some OpenERP generics related to access rights (duplicate for example is based on your ability to create).

0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 7/8/14, 9:09 AM

Another possible solutions override Unlink Method and restrict the user based on your requirement

For example,

     def unlink(self, cr, uid, ids, context=None):
        if ids: #And add your condition
            raise osv.except_osv(_('Invalid Action!'), _('Sorry You Cannot delete the records!'))            
        return None

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: 7/7/14, 11:55 AM
Seen: 501 times
Last updated: 3/16/15, 8:10 AM