

With that fixed you could now try again all the methods for including your custom font, including the following: I test it by changing the color and it works in html and pdf reports. The way to go is extend the report layout to add your css files or styles to the head or create a new report layout to ensure that your css is loaded in the head only for your target report template. So, what am I missing / doing wrong and has anybody got this working?įirst the css that you declare in the file mylayout.css is not used because of this:Ĭss and style declarations It's working ok, just a little more hard than expected, I just test it locally by modifying the saved view in the database for my working layout view(website module override original report layout) to add my style(ugly yeah), the scenario work by collecting the styles defined in the head of the report document, as you said is not working for the body of the report document, at least for pdf, for html is ok. I'm 100% sure the code works because I've tested this in a basic HTML page and the font is rendered. otf file on the same level as the XML report file. My code: This is to test my custom font.īut this doesn't work either. So then I decided to give it a try with inline css (style). Neither the font is used and neither is the color applied. #This creates the default items in the model, so we don't ever have to create it manually.īut doing so did not change anything to my report. I've added the CSS file to my _openerp_.py: # any module necessary for this one to work correctly

In this file I've added the following: cool_font

In my module I've made static/src/css and added a file mylayout.css. My initial idea was to add a CSS file that references the font file but that doesn't seem to work. Has anybody had any succes adding a custom font to a QWeb report?
