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

Step 1: I did add a Google Webfont to the common assets in a module with the following xml:

<openerp>
 <data>
     <!-- Adds all assets in Odoo -->
     <template id="assets_common" name="tw_custom_static_resources assets" inherit_id="web.assets_common">
         <xpath expr="." position="inside">
             <!--These links will be called when loading your Odoo -->
             <link rel="stylesheet" href="/tw_custom_static_resources/static/src/css/custom.css"/>
         </xpath>
     </template>
 </data>
</openerp>

The content of the custom.css file is the following:

@import url(https://fonts.googleapis.com/css?family=Open+Sans);

Step 2: I did add the file custom_reports.css to the report.assets_common by this xml template:

<openerp>
 <data>
     <!-- Adds all assets in Odoo -->
     <template id="assets_common" name="tw_custom_reports assets" inherit_id="report.assets_common">
         <xpath expr="." position="inside">
             <!--These links will be called when loading your Odoo -->
             <link rel="stylesheet" href="/tw_custom_reports/static/src/css/custom_reports.css"/>
         </xpath>
     </template>
 </data>
</openerp>

The content of the custom_reports.css file is

body{   font-family: 'Open Sans', sans-serif !important;
}

Unfortunately this does not work. Reports do not change the font and external reports loose the footer.

Remark: When I add the style attribute style="font-family: 'Open Sans', sans-serif;" directly to the header or footer tag in external header/footer reports layout, the proper font is applied.

Any idea on how to solve this is much appreciated.

아바타
취소
관련 게시물 답글 화면 활동
0
4월 22
2102
0
8월 23
1840
0
3월 22
2
2
6월 19
4099
0
1월 17
5467