Skip to content

[FIX] tracking_manager: float value precision - #3711

Open
maciej-wichowski wants to merge 1 commit into
OCA:17.0from
versada:17.0-fix-tracking_manager-float-precision
Open

[FIX] tracking_manager: float value precision#3711
maciej-wichowski wants to merge 1 commit into
OCA:17.0from
versada:17.0-fix-tracking_manager-float-precision

Conversation

@maciej-wichowski

Copy link
Copy Markdown

Values read from database are not rounded, while written ones go through float_round, which may return a value differing by one unit in the last place (0.1 -> 0.09999999999999999). Comparing them with != reported a change on every write of an unchanged value, and the raw value was then displayed as is. Compare and display float and monetary fields at their own precision.

Values read from database are not rounded, while written ones go through
`float_round`, which may return a value differing by one unit in the last
place (0.1 -> 0.09999999999999999). Comparing them with `!=` reported a
change on every write of an unchanged value, and the raw value was then
displayed as is. Compare and display float and monetary fields at their
own precision.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sebastienbeau, @Kev-Roche,
some modules you are maintaining are being modified, check this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants