Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2211 Weergaven

I'm using odoo 16. Apparently odoo 16 is using bootstrap 5. I have a problem when using the bootstrap class in a pdf report. In HTML view, there is no problem. But once I print as PDF, it breaks. Then I found that bootstrap 5 is not stable for wkhtmltopdf. 


https://github.com/odoo/odoo/issues/136360#:~:text=Here%20are%20at%20least%205%20things%20the%20Odoo%20team%20could%20have%20done%20to%20mitigate%20this%20issue%3A 


I want to try using bootstrap 4 in report pdf only. How can I achieve this?

Avatar
Annuleer
Beste antwoord

Hi,

To do that in your manifest in web._assets_bootstrap 
Add these lines

'web._assets_bootstrap': [
            (‘after’,’web/static/src/scss/import_bootstrap.scss', your_module/static/src/scss/import_bootstrap_4.scss’),
]

Make sure that you have a file named import_bootstrap_4 which has bootstrap v4 in it

Alternatively you could also try
'web._assets_bootstrap': [
            (‘remove’,’web/static/src/scss/import_bootstrap.scss')
            your_module/static/src/scss/import_bootstrap_4.scss’,
]

Hope it helps

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jan. 24
5639
PDF reports Opgelost
5
jul. 25
2026
0
mrt. 24
1211
2
mrt. 24
2568
1
feb. 24
2591