Thibault Francois bc6dc53b6d [FIX] account: issue with not rounding price_subtotal
Write on business field on account.move.line
may lead to an unbalanced move due to currency conversion
from the price_subtotal to debit or credit

How to reproduce:
You need to create an invoice in a different currency
than the company currency

The rate form currency to company currency should be much
bigger then 1 for example 8 or 10

Create a line the will have a pricesubtotal
with 3 decimal

For example:
price unit : 28.8
qty: 4
discount: 22%

the price_subtotal will be 89.856
rounded in the form to 89.86
Based on that with a rate of 7.79356837023608
You end up with a credit of 700.33

then write on the line, for example the analytic account
It will trigger the computation of the price subtotal
and directly with that value the credit

and you endup with a credit 700.30

which is not balanced with the 700.33 of the other line

Solution:
Always round the pricesubtotal computed with the currency before
using it in any further computation

closes odoo/odoo#47305

X-original-commit: a60017df0e947e32f0606ee1487224d2c00470a4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-20 07:59:25 +00:00
2020-02-13 11:45:39 +00:00
2020-03-17 09:48:34 +00:00
…
2019-10-03 12:48:09 +00:00
…
2015-09-08 17:58:38 +02:00
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +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%