Odoo Help

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 2,427 views

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

2
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
On 2/5/15, 3:24 PM

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

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.

Register

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

2 follower(s)

Stats

Asked: 2/5/15, 1:55 PM
Seen: 2427 times
Last updated: 3/28/16, 4:26 PM