تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2124 أدوات العرض

I am having difficulties with the layout of my custom PDF reports - I can change the layout with css: eg. <div style="text-align: center"> works but <div  class="text-center"> does not work. Is there any reason for this - otherwise I will have to edit all my custom reports.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Thanks for the reply. I have been able to reuse the CSS classes by regenerating assets. This was a good resource: https://medium.com/@reedrehg/odoo-images-and-attachments-explaining-and-regenerating-assets-d1eb7fe8a3ed

الصورة الرمزية
إهمال
أفضل إجابة

Your first version is called inline style, while the second version is styling using css classes. These classes have to be added as static css files to your module or to be appended to the default asset files (depending on your Odoo version). Please use Google for further assistance. If your classes are missing or are of lower specifity, they will not work.

الصورة الرمزية
إهمال