Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

yvaucher
Copy link
Member

@yvaucher yvaucher commented Jan 12, 2022

Backport of 0eccd39

I couldn't apply the unit tests changes as the tests didn't exist in v10.

Commit content:

5195550 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
    (a8d01cb) 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#77603

Signed-off-by: Xavier Morel (xmo) xmo@odoo.com

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

5195550 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
  (a8d01cb) 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#77603

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
@yvaucher yvaucher marked this pull request as ready for review January 12, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants