Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Some reports wich use DejaVuSans font couldn't be printed because of missing this font in system.
when i try to print a report, i got this error message :
openerp.report.render.rml2pdf.trml2pdf: Could not locate font DejaVuSans, substituting default: None
How can I fixed this error ?
I got the same issue in Odoo 9 for handling custom fonts in RML reports. I have solved this problem by giving full font path in openerp/report/render/rml2pdf/customfonts.py. In the third element of tuple in CustomTTFonts in customfonts.py, rather than just to pass the name of the custom font use full path.
THSarabun', "THSarabun", "/usr/share/fonts/truetype/THSarabun/THSarabun.ttf", 'normal')..
CustomTTFonts = [ ('Sun-ExtA',"Sun-ExtA", "/usr/share/fonts/truetype/Sun-ExtA.ttf", 'normal'), ('THSarabun', "THSarabun", "/usr/share/fonts/truetype/THSarabun/THSarabun.ttf", 'normal'), ('THSarabun Bold', "THSarabun Bold", "/usr/share/fonts/truetype/THSarabun/THSarabun_Bold.ttf", 'bold'), ('THSarabun Italic', "THSarabun Italic", "/usr/share/fonts/truetype/THSarabun/THSarabun_Italic.ttf", 'italic'), ('THSarabun BoldItalic', "THSarabun BoldItalic", "/usr/share/fonts/truetype/THSarabun/THSarabun_BoldItalic.ttf", 'bolditalic'),]
Hope this will work.
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
|Asked: 1/29/15, 11:24 AM|
|Seen: 1743 times|
|Last updated: 2/22/16, 8:19 AM|