Odoo Help


How to add css to pdf invoice report in v8?

Daniela Scarpa
on 2/17/16, 8:14 AM 1,587 views


I am trying to add my custom css to my pdf report (inherited account.report_invoice_document). To link the css file, I add this code in xml file:

<template id="assets_backend" name="invoice assets" 
<xpath expr="." position="inside">
<link rel="stylesheet"
 When I print my invoice, I cannot see the right layout, according to added classes.

I have tried the same in v9 and everything is working, but in v8 it doesn't.


Akash Balar
On 3/12/16, 1:22 AM

Custom css directly add in custom report.

<?xml version="1.0" encoding="utf-8"?>


        <template id="report_custom">

            <t t-foreach="docs" t-as="o">

                <div class="page" >


                            .table_border{border:1px solid black; padding: 5px; width:100%; border-collapse: collapse;}

                            .table_border tr td{border:1px solid black; padding: 2px;}






Thanks @Akash Balar, It helps me a lot

Jignesh Mehta
on 3/12/16, 1:28 AM


if its not working like this you can directy give style to your attributes

It should effect.


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.


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

1 follower(s)


Asked: 2/17/16, 8:14 AM
Seen: 1587 times
Last updated: 3/12/16, 1:27 AM