jbw d5e290b595 [FIX] account: fix reconcile rule percentage calculation
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812
the way the percentage is calculated is changed.
This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile
a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %)

After cited commit:
invoice 200, bank statement 180:
(|-180| - |20|) / |-180| * 100 = 88.89%
invoice 200, bank statement 220:
(|-220| - |-20|) / |-220| * 100 = 90.91%
credit note 200, bank statement -180:
(|180| - |-20|) / |180| * 100 = 88.89%
credit note 200, bank statement -220:
(|220| - |20|) / |220| * 100 = 90.91%

Now:
invoice 200, bank statement 180:
100 - |20| / |(-180 - 20)| * 100 = 90%
invoice 200, bank statement 220:
100 - |-20| / |(-220 - -20)| * 100 = 90%
credit note 200, bank statement -180:
100 - |-20| / |(180 - -20)| * 100 = 90%
credit note 200, bank statement -220:
100 - |20| / |(220 - 20)| * 100 = 90%

closes odoo/odoo#71030

Task: 2427089
X-original-commit: 5800f20ccf63ef8482d1460f46c8c5fe30eac822
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-05-19 11:31:41 +00:00
2021-05-07 15:13:07 +00:00
…
…
…
…
2021-05-17 19:26:27 +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%