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.

1

How to get all ids in printing mutiple records?

By
willie ho
on 3/10/15, 1:53 AM 953 views

I would like to print report for multi records by choosing them in a tree view.

Can I get id(or other field) for all the records?

1
Mariusz Mizgier
On 3/10/15, 2:02 AM

For Odoo v7 it will be context.get('active_ids')

For Odoo v8 it will be self.env.context.get('active_ids') 

Both will return a list of selected ids (if in tree view) or a single element list if in form view and used an action button.

Thanks Mrizgier, but how can i pass context to the report?

willie ho
on 3/10/15, 2:55 AM

How do you print your report? Sxw, mako or aeroo template?

Currenda Sp. z o.o., Mariusz Mizgier
on 3/10/15, 3:01 AM
0
Mariusz Rajfura
On 3/15/15, 5:17 PM

I subscribe to the questions.

How pass to qweb report ids of all records from tree view, because selecting on screen gives fixed amount (typically 80). I don't want to change this default setting for e.g. for 100000 ;-)

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

2 follower(s)

Stats

Asked: 3/10/15, 1:53 AM
Seen: 953 times
Last updated: 3/16/15, 8:10 AM