2
0
Jairo Llopis 4e15e63732
[FIX] account_journal_general_sequence: optimize recomputes when renumbering
When calling `_next()` in a sequence, it issues calls to `search()`, especially if it is a no-gap or date-range-based sequence (which is common in this use case).

When doing a search, Odoo triggers recomputations. Thus, when doing both a write and a call to `_next()` in the same loop, Odoo had to flush to DB too often, causing a bottleneck.

Now, the process is more optimized:
1. Cache all new entry numbers.
2. Write them all.
3. Mark them all as modified at once, to batch-trigger recomputations.

To reduce the amount of recomputations, tracking is disabled for the entry number. After all, before renumbering there's already a warning telling you that you shouldn't renumber if you already published those entry numbers to your fiscal authority.

Another pseudo-improvement is that the info log is shorter. Enable debug logging to log the list of IDs changed.

A test was failing because it was relying on the fact that computations were not getting as lazy as they should. Manual flushes are added to imitate a user doing different invoice creations.

@moduon MT-3082
2023-06-26 13:50:12 +01:00
2023-06-06 15:51:25 +00:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2022-10-03 19:47:06 +02:00
2023-06-26 06:27:04 +00:00
2022-12-24 00:58:24 +01:00

Runboat Pre-commit Status Build Status codecov Translation Status

account-financial-tools

TODO: add repo description.

Available addons

addon version maintainers summary
account_asset_batch_compute 16.0.1.0.0 Add the possibility to compute assets in batch
account_asset_management 16.0.1.0.1 Assets Management
account_cash_deposit 16.0.1.2.0 Manage cash deposits and cash orders
account_chart_update 16.0.1.0.1 Wizard to update a company's account chart from a template
account_fiscal_position_vat_check 16.0.1.1.0 Check VAT on invoice validation
account_fiscal_year 16.0.1.1.0 eLBati Create Account Fiscal Year
account_fiscal_year_auto_create 16.0.1.0.2 legalsylvain Automatically create new fiscal years, based on the datas of the last fiscal years
account_invoice_constraint_chronology 16.0.1.0.2 Account Invoice Constraint Chronology
account_journal_general_sequence 16.0.1.0.4 yajo Add configurable sequence to account moves, per journal
account_journal_lock_date 16.0.1.0.0 Lock each journal independently
account_lock_date_update 16.0.1.0.0 Allow an Account adviser to update locking date without having access to all technical settings
account_move_line_purchase_info 16.0.1.0.0 Introduces the purchase order line to the journal items
account_move_line_tax_editable 16.0.1.0.0 Allows to edit taxes on non-posted account move lines
account_move_name_sequence 16.0.1.1.3 alexis-via moylop260 frahikLV Generate journal entry number from sequence
account_move_print 16.0.1.0.0 JordiBForgeFlow Adds the option to print Journal Entries
account_template_active 16.0.1.0.1 legalsylvain Allow to disable / enable account template items (tax, fiscal position, account)
account_usability 16.0.1.0.3 legalsylvain Adds missing menu entries for Account module and adds the option to enable Saxon Accounting
base_vat_optional_vies 16.0.1.0.1 Optional validation of VAT via VIES

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Description
OCA account financial tools fork
Readme 9.3 MiB
Languages
Python 63.3%
HTML 36.7%