Hi,
I'm trying to display an image when exporting excel file in odoo 16. Here is my code , but still not working.
Any help please ??
sheet.insert_image('A1', 'my_module_name/static/src/img/logo.png')
Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I'm trying to display an image when exporting excel file in odoo 16. Here is my code , but still not working.
Any help please ??
sheet.insert_image('A1', 'my_module_name/static/src/img/logo.png')
Thanks.
Hi Cristina,
# first you need to import get_module_resource method
from odoo.modules.module import get_module_resource
#Then you write this line code
sheet.insert_image('A1', get_module_resource('my_module_name', 'static/src/img', 'logo.png'))
Thanks & Regards,
Brain Station 23 Ltd.
Mobile: (+880) 1404055226
Email: sales@brainstation-23.com
Web: https://brainstation-23.com/
Address: (Building-1) 8th Floor, 2 Bir Uttam AK Khandakar Road, Mohakhali C/A, Dhaka 1212, Bangladesh
It works , thank you , Can I resize the Image from A1 to F1 and for 5 rows of excel please?
You can use x_scale, y_scale parameter in the insert_image method
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 | |
---|---|---|---|---|
|
2
thg 5 23
|
2905 | ||
|
1
thg 11 22
|
3604 | ||
|
0
thg 12 22
|
4476 | ||
|
0
thg 9 24
|
1430 | ||
|
0
thg 5 23
|
66 |