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
[FIX] product: price list reports with too many fractional digits #36705
[FIX] product: price list reports with too many fractional digits #36705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really a good idea to change the return type of such a method... Maybe create _get_price_repr
and call it in the report?
Before this commit, when printing the Price List report of a Product Variant, the price is printed directly from the float result of the calculation of the price, even if this price is rounded, the representation of the float can have, sometimes, float precision errors (a lot of 0 after the decimal point, and a 1 or 2 at the end). Now, the function returns a string formatted to the correct number of fractional digits. opw-2069305
2e9421e
to
6403767
Compare
@nim-odoo I just made the changes we talk about. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo r+
Merged at 4ae4c55, thanks! |
Before this commit, when printing the Price List report of a Product Variant, the price is printed directly from the float result of the calculation of the price, even if this price is rounded, the representation of the float can have, sometimes, float precision errors (a lot of 0 after the decimal point, and a 1 or 2 at the end). Now, the function returns a string formatted to the correct number of fractional digits. opw-2069305 closes odoo#36705 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, when printing the Price List report of a Product Variant, the price is printed directly from the float result of the calculation of the price, even if this price is rounded, the representation of the float can have, sometimes, float precision errors (a lot of 0 after the decimal point, and a 1 or 2 at the end). Now, the function returns a string formatted to the correct number of fractional digits. opw-2069305 closes #36705 closes #36770 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
@jpp-odoo maybe to backport in v11 |
Before this commit, when printing the Price List report of a Product
Variant, the price is printed directly from the float result of the
calculation of the price, even if this price is rounded, the
representation of the float can have, sometimes, float precision errors
(a lot of 0 after the decimal point, and a 1 or 2 at the end).
Now, the function returns a string formatted to the correct number of
fractional digits.
opw-2069305