Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
7350 Zobrazení

Hi, I try to load css file inside my template but with no results.


<template id="report_quatations_document" inherit_id="sale.report_saleorder_document">

     <xpath expr="." position="inside">

         <link rel="stylesheet" href="/my_module/static/src/css/tablas.css"/>

     </xpath>

                <xpath expr="//div[@class='page']//h2" position="replace">

                    <t t-if="doc.team_id.name == 'Laboratorio'">


                        <table> 

                            <tbody>

                                <tr style="width: 33%;">

                                    <td>FORMA DE ENVÍO</td>

                                    <td>Fax</td>

                                    <td>Email</td>

                                </tr>

                                <tr>

                                    <td></td>

                                    <td>Correo Postal Ordinario</td>

                                    <td class="last-element">Mensajería</td>

                                </tr>

                                <tr>

                                    <td></td>

                                    <td>Correo Postal Certificado</td>

                                    <td class="last-element">Entrega Personal</td>

                                </tr>

                            </tbody>

                        </table>

                </xpath>

</template>


Is that (in bold) correct way to load the css file?

Avatar
Zrušit
Nejlepší odpověď

Hi Jakub:

Remove the bold part from this and put it in a custom template that extends web.report_assets_common

Avatar
Zrušit
Nejlepší odpověď

You may want to read this little tutorial from Yenthe about adding static resources to Odoo in general:

https://www.odoo.yenthevg.com/adding-static-resources-css-and-javascript-to-odoo/

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 24
1293
0
říj 20
2446
0
čvn 15
3970
4
dub 24
20275
0
pro 20
6167