Vauxoo / addons-vauxoo

All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core, if something is here, maybe it is solving an issue in your company, try it and report what you see.
http://www.vauxoo.com
193 stars 288 forks source link

[IMP] account_anglo_saxon_stock_move: Improvement performance #1218

Closed hbto closed 7 years ago

hbto commented 7 years ago

Use batches to process reconciling and avoid trigger the computed field related many times.

This PR will try to fix a performance issue when validating invoices with many invoice lines at account_move_line aml creation will try to reconcile the lines and at the same time will try to update functional fields that are aml sensitive in invoice that were introduced by commission_payments. This part was superseded by https://github.com/Vauxoo/addons-vauxoo/pull/1219

hbto commented 7 years ago

This MP/PR has been squashed / rebased and is ready to be merged.

@moylop260

moylop260 commented 7 years ago

LGTM

hbto commented 7 years ago

Tests in customer's instance have been quite successful:

Now we can visualize many Journal Items in a single Reconciliation:

journal_items_-_odoo
hbto commented 7 years ago

Let's keep an eye in this branch as fore-coming changes in master appears to include reconciliation created by the stock-in & stock-out accounts.

https://github.com/odoo-dev/odoo/blob/master-stock-val-cur-rate-reconcile-oco/addons/stock_account/models/account_invoice.py#L101-L126