Odoo Help


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.


PDF report not using CSS styles

on 5/24/16, 9:24 PM 613 views

Odoo v9 on Windows 7 64bit and I cannot make PDF reports use CSS styles.

So far i've tried:

  • Different versions of wkhtmltopdf (32bit/64bit)

  • Setting System Parameters
    'web.base.url' to 'http://localhost:8069'

    'web.base.url.freeze' to 'True'

    'report.url' to 'http://localhost:8069'

  • Using absolute/relative path css:

    <link href="http://localhost:8069/cds/static/src/css/cds_report.css" rel="stylesheet"/>
  •  Using internal CSS:

    <style> body { font-family: calibri; } </style>

The only thing that worked is setting the style inline:

<div style="...">

I am kinda lost by now. This is report template example:

<template id="cds2_invoice">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="cds2.cds2_invoice_document" t-lang="o.partner_id.lang" />

<template id="cds2_invoice_document">
.colored {
background-color: #4D4D73;
<div class="page">
<div class="row">
<div class="colored">

Juan Vicente Pascual
On 5/25/16, 5:37 AM


<template id="cds2_invoice">

put the next code,

<template id="my_layout" inherit_id="report.minimal_layout">

<xpath expr="//style" position="after">

<link href="MODULE_NAME/static/src/css/style.css" rel="stylesheet"/>



Kind Regards,


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

1 follower(s)


Asked: 5/24/16, 9:24 PM
Seen: 613 times
Last updated: 5/25/16, 5:37 AM