bce02f46d317f887ba62ed0df00d5659a85c223a
Allow to perform multiple reconciliation at once in order to: - ...batch the creation of records as much as possible. Creating an account.partial.reconcile force the orm to search for amls in order to invalidate the reconciliation fields like amount_residual/amount_residual_currency. - ...reduce the number of flush inside the orm and batch the compute. Each call to reconcile is looking for the payment's state of invoices before/after the reconciliation. This step is costly because this will flush all the reconciliation data and then call the computes to get the fresh value of payment_state. - ...modify more easily the way the lines are matched together. Before this commit, the lines were split into two batches sorted by some criteria including the currency: debit and credit. Then, we were matching them together sequentially. Now, we make the same things except we do that first for each batch of amls sharing the same currency in order to reduce the number of cross-currencies reconciliation. - ...allow the orm to prefetch all the partials in the reconciliation chain all at once. The full reconcile needs to be creating on the full reconciliation graph starting on the current amls so we need to travel the matched_debit_ids/matched_credit_ids in order to find all the involved amls. Fetching all this data at once is also reducing the number of queries made by the orm. Let's take an example: Suppose 10 amls: a1, a2, ..., a10 Suppose 10 amls: b1, b2, ..., b10 You want to reconcile respectively a1 with b1, ... , a10 with b10. Before this commit, each reconciliation was done as follow: - Check the payment_state of invoice (on 2 amls) - Create a partial reconcile (single record) - Create a full reconcile (single record) - Compute the reconciliation data to compute payment_state (on 2 amls) All of that, 10 times sequentially. With the new '_reconcile_plan' method, we are able to give a list of recordset [a1 + b1, ..., a10 + b10]: - Check the payment_state of invoice (on 20 amls) - Create a partial reconcile (10 records) - Create a full reconcile (10 records) - Compute the reconciliation data to compute payment_state (on 20 amls) For a reconciliation using 2000 records (a1, ..., a1000 & b1, ..., b1000), the time to reconcile it was about +-34 seconds. Now, it's about +- 3 seconds. closes odoo/odoo#113680 Related: odoo/enterprise#37543 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%