Skip to content
Snippets Groups Projects
Commit 795ce676 authored by Rémy Voet (ryv)'s avatar Rémy Voet (ryv)
Browse files

[FIX] stock_account: fix rounding adjustment


This fix (odoo/odoo#46850) was too permissive and fix too much
stock valuation issues (other than rounding error) under the hood.
The problem of the "too permissive" is will hide some errors
without get any feedback about them. Also, it changes the SVL value
without any explanation.

To avoid the first issue, apply a threshold on the rounding adjustment.
This threshold is '(quantity_out * smallest_value_of_the_currency) / 2'
(`smallest_value_of_the_currency` = `rounding` field of the related
currency).
Also to improve debugging, add a line in the description
about the rounding adjustment done in a SVL

task-2452786

closes odoo/odoo#66725

X-original-commit: a169d62e8999e90743401fcfe85200450ac6c628
Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
parent d52ec21c
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment