跳至內容
選單
此問題已被標幟
3 回覆
10398 瀏覽次數

In Odoo 9C:

I would like to understand, how to add an custom fonts to the Qweb Reports.

Am aware that this question has already been raised in the forum, However I was unable to get good picture out of it, hence seeking for a vital solution.

So appreciate if somebody can educate me about this or share any documentation if exists, which would help me to understand better and sail through it.

Any help appreciated.


P.S.

@Yenthe, Your question closely matches with mine, would you mind sharing your knowledge.

Thanks.

頭像
捨棄
最佳答案

Inside my stylesheet I added something like this.

<style type="text/css">

<![CDATA[

/* Arial Narrow */

@font-face {

font-family: 'Arial Narrow';

font-style: normal;

src:url('/test_module/static/src/fonts/arial-narrow.woff') format('woff'),

url('/test_module/static/src/fonts/arial-narrow_d.ttf') format('truetype');

}

]]>

</style>

頭像
捨棄
作者

Hi I tried this but its not working for me. then I tried a simple one like

<style type="text/css">

.th{

background-color: blue;

}

</style>

Just trying add background color to the table header, no luck. Thanks

作者

Well finally made it working, However I would like to know from where can I get the URL for the font? Am looking for font Calibri

最佳答案

hello deep,

please try to check this code,


create a css file in your module like as

module/static/src/css/file.css

.row {

font-family: 'Arial Narrow';

font-style: normal;

background-color: white;

}


specified css file name in your openerp file,

'css': ['static/src/css/your_file.css'],


after specify openerp file you can apply below this link in your report file

example name as report_file.xml,

<div class="page">

<link rel="stylesheet" href="/college/static/src/css/file.css"/>

</div>

頭像
捨棄
作者

Hi, I tries this.. no luck.. Thanks

upload your error code

I tried above code its work for me

相關帖文 回覆 瀏覽次數 活動
1
7月 19
6082
3
12月 16
5579
0
1月 24
1517
0
1月 24
1215
0
9月 23
1851