Skip to content
Snippets Groups Projects
Commit 9f8da7bb authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] web: more reliably avoid downloads on new file


51955505 mitigated an issue of being
able to try and download files which don't exist yet, make the fix
more reliable by clearing out the field completely and hiding the
content if the (readonly) field has no value *or the record is not
saved yet*.

Also clean up the code:

* an old-style forward port created a duplicate fixprovement
  (a8d01cbf) which seems less correct
  as it applies conditionally
* and the code is branchier than necessary, we can make it simpler by
  judiciously leveraging jquery's API

closes odoo/odoo#77830

X-original-commit: 05db9be15d75dc0794095aad75c80d0c2e540808
Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 061037fb
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment