Hi, I try to include some css in my qweb report, but it doesn`t work,
can anyone take a look please what is wrong? Everything works fine but my "tables.css" file.
My report:
<template id="report_dossier_document">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<!-- header & footer: -->
<t t-call="dossier_analaqua.extend_layout">
<div class="page">
<h2><span t-field="o.tipo"/></h2>
...
</div>
</t>
</t>
</t>
</template>
templates/assets.xml: (included in manifest.py)
<template id="assets_analaqua" name="static_analaqua assets" inherit_id="web.report_assets_common">
<xpath expr="." position="inside">
<link href="/dossier_analaqua/static/src/css/tables.css" rel="stylesheet" type="text/css"/>
</xpath>
</template>
tables.css pathfile is correct: dossier_analaqua/static/src/css/tables.css:
h2 {
text-align: center;
}
table > th {
border: 1px solid grey;
padding-top: 10px;
}
Hello,
Try this and make sure your css file has .less extension.
<template id="assets_analaqua" name="static_analaqua assets" inherit_id="web.report_assets_common">
<xpath expr="." position="inside">
<link href="/dossier_analaqua/static/src/css/tables.less" rel="stylesheet" type="text/less"/>
</xpath>
</template>