OCA / web

Odoo web client UI related addons
GNU Affero General Public License v3.0
926 stars 1.87k forks source link

[15.0][FIX] web_pivot_computed_measure: Avoid Infinity errors by comparisons #2796

Closed CarlosRoca13 closed 5 months ago

CarlosRoca13 commented 5 months ago

As with the values that computed measurements can take, comparisons can also take these values which are formatted by the function getFormattedVariation. So we extend this method to take infinite values into account.

cc @Tecnativa TT48745

ping @pedrobaeza @chienandalu

pedrobaeza commented 5 months ago

@CarlosRoca13 can you indicate the steps to reproduce in the commit message?

CarlosRoca13 commented 5 months ago

I don't know exactly the precise steps to get to the error, I have only been able to reproduce it in our client instance and I know that the consequence is that at this point an Infinity value is arriving. But I could not reproduce it in a clean instance 🤔

BTW I test this code in the instance of the client by adding it with the console of the browser and it works well

pedrobaeza commented 5 months ago

/ocabot merge patch

OCA-git-bot commented 5 months ago

On my way to merge this fine PR! Prepared branch 15.0-ocabot-merge-pr-2796-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot commented 5 months ago

Congratulations, your PR was merged at 411eef22f2f81a1523501a16059825c56e8593c4. Thanks a lot for contributing to OCA. ❤️