[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:Xavier Morel (xmo) <xmo@odoo.com>
Loading
Please register or sign in to comment