Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Odoo9C: How to add custom fonts to QWeb reports?

By
deep
on 7/19/16, 9:50 AM 374 views

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.

1
Giezel Esteves
On 7/19/16, 11:42 PM

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

deep
on 7/20/16, 2:38 AM

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

deep
on 7/20/16, 7:03 AM
0
kirubanidhi
On 7/20/16, 6:02 AM

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

deep
on 7/21/16, 12:42 AM

upload your error code

kirubanidhi
on 7/22/16, 1:13 AM

I tried above code its work for me

kirubanidhi
on 7/22/16, 1:14 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/19/16, 9:50 AM
Seen: 374 times
Last updated: 7/26/16, 2:54 AM