Odoo Help

1
2 Answers
0
Fran Dávila
3/8/19, 11:15 AM

Hi! 

I have a similar problem . In my case I have Odoo installed on my server and no fonts are rendered.  I use wkhtml2pdf and every Image on the invoices, quotes, et. display fine, but no fonts are ever. displayed.

Which are the folders (path) in which you add the css files separately? And also, is the code you are writing used into the qweb views of the template? If not... where do you add the code?


Thanks

0
Maxime MARAIS
8/13/18, 6:42 AM

Finally, I made it work. Googling a little more I read wkhtml2pdf may not respect the CSS instructions order but the order external files, including CSS files are delivered. 

In my case it appears the inline CSS immediately available (as it's delivered within the HTML file) is overload by a default CSS file defined by Odoo and delivered with a little delay, time for the web server to delivery it.

Solution was :

  • to move my CSS, keeping the base64-encoded font, into a CSS file to be served by the web server

  • to add this code to my template.

        <template id="assets_common" inherit_id="report.assets_common">
            <xpath expr="." position="inside">
                <link href="/enies_invoice/static//src/css/style.css" rel="stylesheet" type="text/css"/>
            </xpath>
        </template>

Hope this can help.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now