Thibault Francois f3c14b93d8 [FIX] sale: rouding issue at creation
Use case
--------

Field computed with precompute=True at creation get the value
of the float without beeing rounded this can lead to rounding
issue where the value computed at creation is different from
the value computed later.

This can lead to the following issue
A so line is create with a unit price of 192 and a discount of
74.246 the price subtotal it thus 49.45

Later a invoice is created based on the same unit price and a discount
rounded at 74.25 and thus a subtotal 49.44

Solution
--------

Since the issue is not fixed (yet) in the orm, we have to format the
provided discount before the record creation (and precomputation)
to make sure the decimal precision is properly applied and that
no incoherence is introduced in the final record values.

closes odoo/odoo#87661

X-original-commit: 2257ac71596033d8d9f1deaf642071124817de3f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-31 15:27:13 +02:00
2022-03-29 20:21:41 +02:00
…
…
…
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%