Commit Graph

5 Commits

Author SHA1 Message Date
Pierre Verkest
4733733066 [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'.
2023-03-27 11:38:57 +02:00
payen000
a958cd7e53 [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.
2022-08-17 19:10:38 +00:00
Pierre Verkest
c60ad5c4b2 [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-07-08 08:38:35 +02:00
Alexis de Lattre
b8ad36239d sequence is now required on journals
Add post-install script to create a sequence for all existing journals
Update README accordingly
2021-11-02 12:00:06 +01:00
Alexis de Lattre
e53aeb87f7 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.
2021-09-08 12:00:18 +02:00