Skip to content
Snippets Groups Projects
Commit 0eccd397 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#77603

Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 5b281c3c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment