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

how to set div in the bottom of the last page in a qweb report?

By
Jesús Ventosinos
on 2/5/15, 1:55 PM 1,734 views

how i can put a div in the bottom of the last page of a qweb pdf report?

2

Anil R. Kesariya

--Anil R. Kesariya--
4321
| 6 5 8
Gandhinagar, India
--Anil R. Kesariya--
ERP Consultant

Key Skill
-
Technical & Functional Expert
Anil R. Kesariya
On 5/18/15, 1:37 AM

Hi Jesús Ventosinos,

This is doable in QWEB report too!

You have to extend (Override) subset function which is defined in 'report' module.

You have to add piece of code inside the subset function : static/src/js/subst.js

var operations = {

'bottom-page': function (elt) { elt.style.visibility = (vars.page === vars.topage) ? "visible" : "hidden"; },

};

for (var klass in operations) {

var y = document.getElementsByClassName(klass);

for (var j=0; j<y.length; ++j) operations[klass](y[j]);

}

<div class="bottom-page">

This content will dislpay only in last page.. now you can add this div where you want.. header ,body or footer it will display on last page only.

<div>

Hope this will helps.

Regards,

Anil.



0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/5/15, 3:24 PM

This is a problem that is difficult to resolve, see similar post

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: 2/5/15, 1:55 PM
Seen: 1734 times
Last updated: 3/28/16, 4:26 PM