Skip to Content
Menu
This question has been flagged
2 Replies
5429 Views

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;

  }

Avatar
Discard

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>

Best Answer

Hello,

Please use this

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


instead of 

<template id="assets_analaqua" name="static_analaqua assets" inherit_id="web.report_assets_common">
Avatar
Discard
Related Posts Replies Views Activity
1
Jun 20
2034
2
Oct 22
4552
2
Mar 21
2513
2
Mar 21
7230
0
Dec 20
2698