Skip to content
Snippets Groups Projects
Commit edd59a02 authored by Thomas Beckers's avatar Thomas Beckers
Browse files

[FIX] l10n_fr_fec: no cash basis compute


Before this, there was a computation of cash basis moves for each reconciliation
done during FEC import and it can slow down a lot the import for nothing since
no taxes will be in the imported entries so no cash basis will result from
reconciliation.

Now, the cash basis moves computation is skipped to improve the performance.

Here are the stats of reconciliation time on fresh database using a FEC file
of ~76000 amls including ~15000 reconciled.

V15 without fix => 8 min 15 s
V15 with fix => 5 min 27 s

V16 without fix => 9 min 36 s
V16 with fix => 1 min 33 s

opw-3274391

closes odoo/odoo#131572

X-original-commit: 5076744e
Related: odoo/enterprise#45633
Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
parent 9f94900f
Branches
Tags
No related merge requests found
......@@ -2406,7 +2406,7 @@ class AccountMoveLine(models.Model):
# ==== Create entries for cash basis taxes ====
is_cash_basis_needed = account.company_id.tax_exigibility and account.account_type in ('asset_receivable', 'liability_payable')
if is_cash_basis_needed and not self._context.get('move_reverse_cancel'):
if is_cash_basis_needed and not self._context.get('move_reverse_cancel') and not self._context.get('no_cash_basis'):
tax_cash_basis_moves = partials._create_tax_cash_basis_moves()
results['tax_cash_basis_moves'] = tax_cash_basis_moves
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment