Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2341 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 24
1273
5
kvě 21
21197
5
pro 23
16783
1
dub 23
2335
2
pro 18
8160