Sunday, August 2, 2026
1 change · 19.0
Code cleanup and technical improvements
This change adds a test that reproduces a warning shown when users download attachments from the file viewer. It does not change the download behavior, but helps maintainers confirm and address the issue safely later.
Original PR description
Clicking the Download button in the FileViewer now triggers a WARNING in odoo.http: <function ...Binary.content_common> called ignoring args {'token'} Root cause:…
Clicking the Download button in the FileViewer now triggers a WARNING
in odoo.http:
<function ...Binary.content_common> called ignoring args {'token'}
Root cause: https://github.com/odoo/odoo/pull/274019
replaced the plain <a href download> element with a div using the download() blob helper:
- https://github.com/odoo/odoo/blob/81607a36bfe30a635cca2c99d969a3a4bed7b27c/addons/web/static/src/core/network/download.js#L498
Binary.content_common() never declared 'token' in its signature, nor **kwargs
- https://github.com/odoo/odoo/blob/81607a36bfe30a635cca2c99d969a3a4bed7b27c/addons/web/controllers/binary.py#L72-L74
So, silently drops it and logs a WARNING on every single FileViewer download, for any attachment.
This commit adds a reproduction test.
# DISCLAIMER:
No functional fix is proposed here; the test only documents and
pins down the regression so a maintainer can decide between:
- adding **kwargs (or an explicit token=None) to content_common(), or
- not sending the dummy 'token' field anymore in download.js, since
it appears to be legacy boilerplate no longer required by any
current route.