I use my own layout template module to create a PDF report in odoo 15. I have found some posts about how it used to work in earlier versions. With odoo 15 it seems to work differently. I have created a div element with the class "page" and the attribute t-attf-style with the following content: background-image:url('/report_invoice/static/src/img/background.svg'); background-size:195mm 282mm; width:195mm; height:282mm; Unfortunately, no image is displayed in the background. How does this work with odoo 15?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Thanks, I can see the background image now in the preview but when I download this preview or create an invoice the image is in the background. But the text (in the preview and the invoice) seem to be hidden. I cant read it but select the text content.
I don't use the view in the technical settings but an external module template that inherits the report_invoice_document.
Hi,After enabling debug mode, go to Settings ->
Technical -> Views and choose the layout. I'm choosing
external_layout_standard here for reference.
After that, add a div in the beginning and give style background-image with the url of the image.
Now save this and try printing the PDF. Note that in the settings, the external_layout_standard should be chosen.
Hope it helps
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 3 24
|
1120 | ||
|
4
thg 3 25
|
46208 | ||
|
2
thg 9 24
|
2552 | ||
|
1
thg 3 24
|
2851 | ||
|
1
thg 6 23
|
2308 |