Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
9698 Ansichten

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.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Apr. 22
2061
0
Aug. 23
1769
0
März 22
2
2
Juni 19
4017
0
Jan. 17
5410