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.
First of all I'm on Odoo 8, I would like to add odoo8 tag but it seems that there has an issue with CORS for the ajax request of tags.
For some module of mines I want to include some custom css files in the printed layout. To achieve this I've made a custom report_layout and used it in my reports, with this I can easily edit header in the assets per submodule.
It's good for HTML report, but when it come to pdf the nightmare begin. As I've seen, the pdf action use another layout that can't be easily override :
render_minimal = partial(view_obj.render, cr, ui, 'report.minimal_layout', context=context)
The report.minimal_layout call a report.assets_pdf that include a style, I've tried to override this template but there is two problems with that :
- The first one is that it does nothing as if the override does not exist (probably a mistake of mine)
- The second one is that the modification will apply to all reports and that's not what I want
Is there a proper way to add custom css in pdf for some report only ? Note that I don't wan't to use inline style. I personnaly think that it could be fine to customize which layout need to be used for a pdf report as we can decide it for html report.
Thanks in advance
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: 12/11/15, 6:39 AM|
|Seen: 906 times|
|Last updated: 12/11/15, 7:00 AM|