odoo/odoo#189080
Created by fw-bot
Merged
at 135e92748a8608b861c92698677c04b04f464d85
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-17.2-17.0-url-attachment-fix-zel-JOGe-fw
- head
- 09c779d60af076127cea5fde58d8efb03810adeb
- merged
- 10 months ago by Discuss, Sébastien Theys (seb)
odoo/odoo | |
---|---|
17.0 | #187970 |
saas-17.2 | #189080 |
saas-17.4 | #189335 |
18.0 | #190142 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #190223 |
[FW][FIX] web,*: file viewer to show url attachment
The file viewer tries to show the document from the url obtained from the defaultSource function in file_model.js. This function builds the url using urlRoute.
Before the fix, the urlRoute is the url from the attachment. This causes the PDF viewer to fail because it has a same-origin policy.
This fix avoids to use the url to the one from the attachment's url directly so that the viewer can show the document correctly with the computed urlRoute.
The attachment url does not need to be used at all, as the odoo server will properly direct.
Forward-Port-Of: #187970