-
- Downloads
[FIX] web: display download button if not dirty
Steps to reproduce:
-------------------
For example:
- add a work permit file to an employee (private information tab);
- try to download it before saving;
Issue:
------
The old file is downloaded or a traceback occurs
if there was no file before.
Cause:
------
When downloading, we use the `/web/content` endpoint.
We will try to read the record in the backend via `_record_to_stream`.
The record is not yet saved in database.
Solution:
---------
Disable download button if record is dirty.
opw-3458842
closes odoo/odoo#134521
Signed-off-by:
Michaël Mattiello (mcm) <mcm@odoo.com>
Please register or sign in to comment