Hello,
In Odoo 16, it is possible to display attached PDF files within the active window. Is there a way to instead open the attached files in a new window ? If so, could you please provide guidance on how to do this ?
Best regards.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
In Odoo 16, it is possible to display attached PDF files within the active window. Is there a way to instead open the attached files in a new window ? If so, could you please provide guidance on how to do this ?
Best regards.
Hi,To open attached PDF files in a new window in Odoo 16, you can
customize the behavior using JavaScript. Below is a step-by-step guide
on how to achieve this:
1. Override JavaScript Functionality: In
Odoo 16, the JavaScript functionality responsible for opening attached
PDF files is handled by "ir.actions.report handlers". You'll need to
override this registry.
2. Modify the JavaScript Code:
Within the JavaScript code, locate the function or event handler that
handles the opening of attached PDF files. Modify this code to ensure
that PDF files are opened in a new window/tab.
3. Use
window.open(): Replace the existing code that opens the PDF files with a
call to the window.open() function. Pass the URL of the PDF file as a
parameter to window.open().
Alternatively, you can explore
third-party modules available in the Odoo app store related to handling
attached PDF files preview.
Hope it helps
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
ต.ค. 20
|
7257 | ||
|
1
มี.ค. 24
|
1951 | ||
|
5
พ.ค. 23
|
15367 | ||
|
2
ธ.ค. 23
|
5361 | ||
|
1
ต.ค. 22
|
2790 |