Skip to Content
Menu
This question has been flagged
2 Replies
1794 Views

I want to reconfigure the invoice prefix so the sequences have Year and Month and Sequence i.e: INV/2024/02/001, and Yes i already know there is a REGEX for that purpose, but the question is WHERE.. do i reconfigure that Regex to follow that pattern, I have Odoo online and i got no knowledge neither access to make this changes at the server/code level...

Avatar
Discard
Best Answer

Hi,

you don't need to dig in the code for that. Just turn on developer mode. (put debug=1 to url or turn it on in settings) 

Then go to invoices select all invoices > menu actions > Resequence

And just put there another slash with month to First New Sequence (the month should be the same month as Date of invoice) than you can see the preview. And all should work from that moment automatically.


Avatar
Discard
Best Answer

Hey there,

I have managed to resequence the Invoice, but I DO NOT want the Number to reset every Month, but every Year! If my last Invoice number in March is INV/2024/03/01234 i want my first Invoice number in April to be INV/2024/04/01235. But it always resets to INV/2024/04/00001. Is there a way to configure this somewhere, maybe in technical/sequences/customer invoices?

Avatar
Discard

I'm afraid this possibility is in default scenario of Odoo. As you can see here https://github.com/odoo/odoo/blob/17.0/addons/account/models/sequence_mixin.py for invoices there is different way how Odoo calculate next number. And also it's strict by the regex it's not user sequence so without programing. There is no luck I'm afraid. Or I don't know the way.