Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2223 Vues

Hello,

I contacted the support because the sequences in my invoices are not working anymore.

They replied to me it's not supported anymore since V14. (I switch from V13 to V15 when it stopped working)

It surprises me as I see it as a lost of functionalities where Odoo is usually increasing it's possibilities.

It also surprises me because in the sequence menu, the explanation is still there, giving the code to use :

Légende (pour le préfixe, suffixe)

Année en cours avec Siècle: %(year)s
Année en cours sans Siècle: %(y)s
Mois: %(month)s
Jour: %(day)s
Jour de l'année: %(doy)s
Semaine de l'année: %(woy)s
Jour de la Semaine (0:Lundi): %(weekday)s
Heure 00->24: %(h24)s
Heure 00->12: %(h12)s
Minute: %(min)s
Seconde: %(sec)s

So I'm wondering it the person said right info saying it's not working in V15.

My sequence was  F%(y)s%(month)s + invoice number and since january, all my invoices are called F2301.... the month is not changing anymore.

Can you help confirm ?

Thanks !

Avatar
Ignorer
Meilleure réponse

Hi,

Yes, dynamic date fields like %(month)s, %(y)s, etc. still work in Odoo 15, but only if you enable “Use subsequences per date_range” on the sequence.


If it’s not enabled, the prefix (e.g. F%(y)s%(month)s) gets evaluated once and then reused, which is why your month stays stuck (e.g. F2301... all year).


To fix:


    Activate developer mode.


    Go to Settings > Technical > Sequences > Sequences.


    Open your invoice sequence.


    Set the prefix to F%(y)s%(month)s.


    Enable Use subsequences per date_range.


    Save.


Odoo will now auto-create a new monthly sub-sequence and update the prefix accordingly (e.g. F2405, F2406, etc.).


Hope it helps.

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
sept. 24
1175
5
mai 21
21061
5
déc. 23
16347
1
avr. 23
2251
2
déc. 18
8067