In last version of odoo, version 8 (or saas-6), to enable special class names to do special things (as for instance a 'last-page' class name to trigger visibility), you should only modify report
module, in static/src/js/subst.js
, and add this code to the subst
function:
var operations = {
'last-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]);
}
In the QWEB ir.ui.views
used by your report, you can then add anywhere (header, body, footer), code with:
<div class="last-page">
My content only displayed if on last page.
<div>
EDIT: An OpenERP/Odoo addon to add this magic class last-page
easily was implemented as an example: https://github.com/0k/report_extended