Odoo Help


How to hide an act_window at the top menu without deleting it?

Juan Formoso
on 11/26/14, 6:56 AM 671 views

I've created an act_window. I've also created a button which calls this act_window. However, the act_window always appears at the top menu in the option More of the tree view of the source model. I want it to disappear, but I don't want to delete the act_window because it's called by my customized button.

<act_window name="Invite partner to an event"

Can anyone help me, please?




| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 11/26/14, 7:18 AM

1. Delete the action , you dont need it
2. change button type from "action" to "object"
3. write a method that opens desired view  like: 

def open_my_view(self,cr, uid, ids, context=None):
    view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'your_module_name', 'view_thate_should_be_opened')
    view_id = view_ref and view_ref[1] or False
    return {
                'type': 'ir.actions.act_window',
                'name': 'Some apropriate name',
                'res_model': 'your.model',
                'res_id': record_id, # if it is transient model first create record, othervise , provide some id
                'view_type': 'form',
                'view_mode': 'form',
                'view_id': view_id,
                'target': 'new',
                'nodestroy': True,


Hope it helps... 

May the source be with you !

Thank you Bole! So, the only way to manage this is through Python, I didn't know that. Regards.

Juan Formoso
on 11/26/14, 7:33 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/26/14, 6:56 AM
Seen: 671 times
Last updated: 3/16/15, 8:10 AM