Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2271 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
set 24
1210
5
mag 21
21110
5
dic 23
16555
1
apr 23
2296
2
dic 18
8102