Skip to content
Snippets Groups Projects
Commit 211c2a76 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#77695

X-original-commit: 0eccd397
Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 687f325b
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment