Commit Graph

23 Commits

Author SHA1 Message Date
OCA-git-bot
9fdf115772 [UPD] README.rst 2023-09-03 11:19:29 +00:00
OCA-git-bot
f5c88726de account_journal_general_sequence 15.0.1.1.0 2023-06-26 12:03:54 +00:00
Jairo Llopis
0aad5b6dd6 [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 12:55:30 +01:00
Weblate
dc7f149ff3 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-15.0/account-financial-tools-15.0-account_journal_general_sequence
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_journal_general_sequence/
2023-06-23 11:53:34 +00:00
OCA-git-bot
8b0c391284 account_journal_general_sequence 15.0.1.0.6 2023-06-23 11:53:08 +00:00
Jairo Llopis
66812c8ffe [FIX] account_journal_general_sequence: unique entry number per journal
The sequence is applied per journal. Thus, we can't require one number per company, but per journal.

@moduon MT-3082
2023-06-23 12:43:58 +01:00
OCA-git-bot
e1abc3ea93 account_journal_general_sequence 15.0.1.0.5 2023-01-31 09:59:29 +00:00
Jairo Llopis
1860f2c479 [FIX] account_journal_general_sequence: let non admins delete sequence ranges
When the renumbering was done after a later sequence date range got added, the wizard was asking for admin permissions. Account managers are the ones that should take this decision, though. Fixed now.

@moduon MT-2185
2023-01-31 09:09:45 +00:00
OCA-git-bot
3e271e22f9 account_journal_general_sequence 15.0.1.0.4 2022-12-15 10:08:22 +00:00
Jairo Llopis
0d6fd05fe5 [FIX] account_journal_general_sequence: let non-admin accounting managers renumber moves
Before this patch, if users were accounting managers but not system administrators, they couldn't execute the account move renumbering.

Now that's fixed and tested.

@moduon MT-1728
2022-12-15 10:01:15 +00:00
OCA-git-bot
43c346fef5 account_journal_general_sequence 15.0.1.0.3 2022-06-21 12:44:54 +00:00
Eduardo De Miguel
e452327976 [FIX] Add entry_number field in ledger reports views 2022-06-20 17:14:54 +02:00
OCA-git-bot
4c0e242067 account_journal_general_sequence 15.0.1.0.2 2022-06-03 12:15:33 +00:00
OCA-git-bot
eff299c6cb [UPD] README.rst 2022-06-03 12:15:32 +00:00
Jairo Llopis
1029cc1cf9 [FIX] account_journal_general_sequence: bottleneck at install
On databases with big amounts of account moves, installation would freeze Odoo for some minutes.

We skip now entry number computation at install, to avoid such cases.

@moduon MT-676
2022-06-03 12:45:38 +01:00
OCA-git-bot
894a2331ac account_journal_general_sequence 15.0.1.0.1 2022-06-02 20:13:57 +00:00
OCA-git-bot
32f44ca762 [UPD] README.rst 2022-06-02 20:13:56 +00:00
oca-ci
8a682f390a [UPD] Update account_journal_general_sequence.pot 2022-06-02 20:10:18 +00:00
Jairo Llopis
8115cf9ab1 [MIG] account_journal_general_sequence: Migration to 15.0 2022-06-02 08:33:08 +01:00
OCA-git-bot
c714b5618a [UPD] README.rst 2022-06-02 08:32:45 +01:00
oca-ci
0df063d9cc [UPD] Update account_journal_general_sequence.pot 2022-06-02 08:32:45 +01:00
Jairo Llopis
434dc37ec4 [FIX] account_journal_general_sequence: support renumber starting from zero
This is a special case when working with `ir.sequence`.

@moduon MT-676
2022-06-02 08:32:44 +01:00
Jairo Llopis
a0fc1c1f9a [ADD] account_journal_general_sequence: account move entry sequence
Under some legislations, account moves must follow a single sequence. Since Odoo removed this sequence number in recent versions, this information was lost.

With this module, you can force your account moves to follow a separate sequence. The sequence is automatic when a move is posted. Includes a wizard to reorder those numbers in the sequence.

@moduon MT-676
2022-06-02 08:32:44 +01:00