Commit Graph

20 Commits

Author SHA1 Message Date
OCA-git-bot
e2973dda44 [UPD] README.rst 2023-09-03 11:19:12 +00:00
OCA-git-bot
6ffb773149 account_journal_general_sequence 14.0.1.1.0 2023-06-26 12:55:32 +00:00
Jairo Llopis
8a670882dc [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:45:49 +01:00
Weblate
8348cceab7 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-14.0/account-financial-tools-14.0-account_journal_general_sequence
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-14-0/account-financial-tools-14-0-account_journal_general_sequence/
2023-06-23 11:58:49 +00:00
OCA-git-bot
31011df9fc account_journal_general_sequence 14.0.1.0.4 2023-06-23 11:58:21 +00:00
Jairo Llopis
18119bbfce [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:44:55 +01:00
OCA-git-bot
dff23f7893 account_journal_general_sequence 14.0.1.0.3 2023-05-11 08:16:17 +00:00
Luis González
bb8fb00c8e [FIX] account_journal_general_sequence: remove freezegun from dependencies
Starting from v14, the library is installed by native Odoo's
requirements.txt [1]. Even if it were not, the library is only used in
tests, hence should not be installed in production environments.

[1] https://github.com/odoo/odoo/blob/1a264d7d9093/requirements.txt#L7
2023-04-20 15:27:13 +00:00
Jairo Llopis
369f4dc0b9 [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 12:02:23 +01:00
Jairo Llopis
ce12e05ceb [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
2023-01-31 12:02:23 +01:00
Bole
4ee88ecc08 Added translation using Weblate (Croatian) 2022-06-29 10:21:07 +00:00
OCA-git-bot
7b8d259971 account_journal_general_sequence 14.0.1.0.2 2022-06-21 12:46:29 +00:00
Eduardo De Miguel
3de7a78de9 [FIX] Add entry_number field in ledger reports views 2022-06-20 17:11:59 +02:00
OCA-git-bot
26c3b1cb18 account_journal_general_sequence 14.0.1.0.1 2022-06-03 12:17:32 +00:00
OCA-git-bot
f5c9bf2a56 [UPD] README.rst 2022-06-03 12:17:31 +00:00
Jairo Llopis
2ebd95053f [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:39:52 +01:00
OCA-git-bot
c4b402c03a [UPD] README.rst 2022-06-01 14:00:08 +00:00
oca-ci
66c9233b1c [UPD] Update account_journal_general_sequence.pot 2022-06-01 13:53:37 +00:00
Jairo Llopis
8390398c60 [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-01 08:29:07 +01:00
Jairo Llopis
d25f4c8dbc [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-01 08:29:07 +01:00