コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
7327 ビュー

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?

アバター
破棄
最善の回答

Hi Jakub:

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

アバター
破棄
最善の回答

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/

アバター
破棄
関連投稿 返信 ビュー 活動
2
9月 24
1260
0
10月 20
2394
0
6月 15
3928
4
4月 24
20232
0
12月 20
6119