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,924 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--
5471
| 6 5 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.


Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66


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--
6750
| 6 5 7
Lodz, Poland
--Zbik--


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: 2924 times
Last updated: 3/28/16, 4:26 PM