콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
7062 화면

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
1051
0
10월 20
2150
0
6월 15
3674
4
4월 24
19722
0
12월 20
5747