Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2217 Представления

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?

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
янв. 24
5646
PDF reports Решено
5
июл. 25
2040
0
мар. 24
1215
Wrong PDF Format Решено
2
мар. 24
2571
1
февр. 24
2597