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

Javascript open tree_view

By
Emanuel Cino
on 12/4/14, 6:31 AM 541 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() {
            this.do_action({
                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 ?

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