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

Are page variables available in Qweb template?

By
Paul Catinean
on 10/27/14, 12:12 PM 1,729 views

Is there a possibility to make conditionals in the template depending on the current page that is being printed in Qweb reports?

e.g: <t t-if="page > 1"> do something that's on other pages except the first </t>

This was available in the header and footer section of report_webkit

Thanks

Did you finally get a way to detect the page number?

Cyrus Waithaka
on 8/17/15, 1:23 PM
1

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 1/8/15, 12:33 PM

page or topage (and other variables) are popolated by javascript in your report. When you put a <span class="page" /> in your report, a js function keep this values from url and put them in the right place. In particulare you can find this function in /addons/report/static/src/js/subst.js.

So it's impossibile to know the value of these variables in your qweb code.

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 2/3/16, 4:14 AM

check this question it may helps


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: 10/27/14, 12:12 PM
Seen: 1729 times
Last updated: 2/3/16, 4:14 AM