Odoo Help


Javascript open tree_view

Emanuel Cino
on 12/4/14, 6:31 AM 1,116 views

I have a buton in a view that call a javascript function and want to open the invoice view filtered on the current partner. I have the following code :

open_invoices: function() {
                views: [[false, 'tree']],
                view_type: 'form',
                view_mode: 'tree,form',
                res_model: 'account.invoice',
                type: 'ir.actions.act_window',
                target: 'current',
                context: {'search_default_partner_id': partner_id}

However, this opens all the invoices (the filter is not done) and the view looks weird, it's not a normal tree view. It also takes a lot of time to load the view... do you see any mistakes ?

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: 12/4/14, 6:31 AM
Seen: 1116 times
Last updated: 3/16/15, 8:10 AM