Nshimiyimana Séna f19de6f5cd [FIX] account: Early Payment Discount Grouping Error with Tax Grids
## Summary

The early payment discount (EPD) grouping functionality can break when
using taxes that add tax tags on their base lines.

## Steps to Reproduce

1. Install the `l10n_be` module
2. Ensure that `Cash Discount Tax Reduction` in the settings is set to
   `Always (upon invoice)`
3. Create a bill and set the payment term to `2/7 Net 30`
4. Add a product line (`l1`) with any Belgian tax and save
5. Add the same product line again (`l2`) and save
6. Attempt to add another product line or remove an existing one and
   save: an error will occur, stating that the move is not balanced

## Cause

The EPD grouping key depends on various factors, including the
`tax_tag_ids` (tax grids) of the product lines. However, the system
currently processes mixed EPDs before taxes. As a result, when saving at
the end of step 5, EPDs are calculated for `l2`. However, `l2` does not
have tags at this stage, while `l1` does, since it was saved earlier.
This discrepancy leads to incorrect EPD grouping.

opw-3129639

closes odoo/odoo#119226

X-original-commit: 044957eac66bad04aa64dd16488843369cd0833e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2023-04-21 15:02:20 +02:00
2023-04-13 17:57:45 +02:00
2023-04-21 08:02:17 +02:00
…
…
…
…
…
2023-01-03 13:16:02 +01: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%