Commit Graph

16 Commits

Author SHA1 Message Date
Moises Lopez - https://www.vauxoo.com/
d8fec98e91 [REF] account_move_name_sequence: Add unittest to create concurrency invoices
Add demo data with standard implementation sequences

In order to test locks issues without changing data (then reverting)
2024-04-22 19:31:55 -06:00
Alexandre D. Díaz
e9eed49b5c fix: account_move_name_sequence: tests: Listen to exceptions for each thread individually" 2024-04-22 14:58:34 -06:00
Luis J. Salvatierra
db005ba894 [REF] account_move_name_sequence: Check invoice name based on journal entry sequence 2024-04-17 19:43:33 +00:00
Moises Lopez - https://www.vauxoo.com/
e1eef83bbd [FW] account_move_name_sequence: Forward-Port of 15.0 to 16.0 2024-04-17 18:25:51 +00:00
Moises Lopez - https://www.vauxoo.com/
37cb577553 [FW] account_move_name_sequence: Forward-Port of 14.0 to 15.0 2024-04-17 11:23:03 -06:00
Moises Lopez - https://www.vauxoo.com/
727721d7a2 [IMP] account_move_name_sequence: pre-commit auto fixes 2024-04-17 11:23:03 -06:00
Pierre Verkest
c62c1b4205 [FIX] account_move_name_sequence: avoid fallback on odoo sequence name
In case an alias is configured to fecth email to generate
account entries. the new_message method directly call the
_compute_name on account move which call the legacy code
provide by account odoo module which should be avoid here.

To reproduce:

* configure an alias on your purchase journal
* send an email to that alias
* the invoice is draft with a number

to mitigate this behavior the suggested patch overwritte
the former method '_compute_name' and call the new implemented
method '_compute_name_by_sequence'.
2024-04-17 11:19:28 -06:00
payen000
a1c7502046 [REF] account_move_name_sequence: Added concurrency tests related to sequence
A demo ir_sequence record with 'standard' implementation was
assigned to the payment journal so that no concurrency errors arise
from using 'no gap' sequences when attempting to create multiple payments.
2024-04-17 11:18:59 -06:00
Rodrigo
0e5739c66f [FIX] account_move_name_sequence: Now you can unlink moves without check sequence fix: 6112f4f59a 2023-01-31 11:49:55 +01:00
Rodrigo
18f890187a [FIX] account_move_name_sequence: With the "account_move_name_sequence" module the "_get_last_sequence" method does not have to propagate the with_prefix parameter. The sequence_prefix parameter will not be completed and will give error as it is False in this line of code. https://github.com/OCA/OCB/blob/16.0/addons/account/models/sequence_mixin.py#L169 2023-01-20 12:11:00 +01:00
Rodrigo
ab8e59d69d [FIX] account_move_name_sequence: call flush before _fetch_duplicate_supplier_reference method
same issue https://github.com/OCA/account-financial-tools/issues/1501
this fix not working for v16 https://github.com/OCA/account-financial-tools/pull/1514
2022-12-08 11:36:41 +01:00
Rodrigo
86eed6c1ed [MIG] account_move_name_sequence: Migration to 16.0 2022-12-08 11:35:30 +01:00
Pierre Verkest
6599bfd112 [FIX] account_move_name_sequence: Use account move date to compute prefix
In case you want name your invoice YYYY-MM-SEQ (ie: 2022-07-00001)
where:
 * YYYY: is the account move year
 * MM: is the account move month
 * SEQ: is a numerical sequence that is continue along the fiscal year
   assuming fiscal year is over two years (ie: from july to june next year)

Before this commit the sequence prefix use now() to be compute but the
range is selected with the account move date.

This commit make consistency computing prefix with the account
move date as well.

So account move manage the first janunary for the last day of
the previous year will properly use the account move date.

Co-authored-by: Alexis de Lattre <alexis.delattre@akretion.com>
2022-11-22 14:36:51 +01:00
Francisco Javier Luna Vazquez
198724234a [FIX] account_move_name_sequence: Exclude no_gap sequences from _is_end_of_seq_chain 2022-11-22 14:36:51 +01:00
Alexis de Lattre
4aeaa9ca51 sequence is now required on journals
Add post-install script to create a sequence for all existing journals
Update README accordingly
2022-11-22 14:36:51 +01:00
Alexis de Lattre
42def7f06f Add module account_move_name_sequence
This module restores the good old behavior where journal entry numbers
were generated from a sequence configured on the journal.
2022-11-22 14:36:51 +01:00