Skip to Content
Menu
This question has been flagged
6 Replies
30140 Views

Hello, I have Odoo 16 online and I would like to change the invoice number and add the month: it should look like "INV/%(year)s/%(month)s/"

After reading some forum post I tried to edit a sequence in "Settings -> Technical -> Sequences and Identifiers -> Sequence" Since there are just 3 sequences I tried to add a new one (see attachement). What would I need to put in the field "Sequence Code"? 


Avatar
Discard
Author

ok thanks for the answer. I added the line as you see in the screenshot, but it has no effect and the invoice number did not change.... do you know what I could do?

Best Answer

Hello Michal,

you can change the sequence in the application itself for invoices.

Just follow this steps:

Go to Invoices and mark the last done invoice and choose from Action menu the option "Resequence":


This page opens. Here you can enter in the field "First New Sequence" the sequence you like:


Changed it here to "INVOICE/2023/03/00004" and click on "Confirm":


Enter a new invoice and this new sequence is now used:


Hope this helps you further. I think in the forum there are existing already similar posts.

Thanks and greetings

Michael

Avatar
Discard

Hi
How will the sequence update each month? When I move from March to April, will I have to manually resequence on the first invoice I create?

Dipti Patil, did you ever discover the answer to your question here?

Best Answer

as the year renew after march my invoice should start with the new invoice no 001 but after applying resequence it shows an error that 001 already exist in previous year so you should start with the higher sequence number from the last save one.

Avatar
Discard
Best Answer

Hi Everyone,

I encountered the same issue on Odoo v16, and here's what worked for me:

  1. I set the Customer Invoice sequence code as "account.move" (I found this by activating developer mode, opening a posted invoice, and checking the model name by hovering over the question mark next to the label on the header of the invoice UI).
  2. Initially, the "Resequence" option was not visible under the action menu. However, after posting a draft invoice and selecting it in the Customer Invoice list view, the "Resequence" option became visible.
  3. I posted a customer invoice, then posted and reset it to draft. This allowed me to edit the invoice number in the system to the format I desired (e.g., "INV/2024/04/00001" in my case).

These three methods worked for me and produced the desired result. I hope this helps someone in this forum facing a similar issue with Odoo. I also noticed that there was a customer invoice series automatically created under "Technical" -> "Sequences" for earlier number series alongside my new series, as I advised created as the first option.

For new Odoo users, please note that you only have to use any one method out of these three. I mentioned all findings that might help someone in some way.

Thanks,

CP


Avatar
Discard

im having a hard time understanding how this worked, there are multiple different types of records in the account.move model. for example, invoices, bills, refunded invoices/bills, etc. creating one sequence code for account.move would seemingly override all of these records to share the same INV prefix which is not ideal.

Best Answer

Hello Paul, did you solve this problem with changing invoice sequence?

Avatar
Discard
Best Answer

I still can't understand why this MAJOR FEATURE has been changed prior to Odoo v14... Without any proper documentation... The sequence settings were nice, now everything needs to be done manually every year before 1st of January... Very annoying, as I have subscriptions invoiced every first day of the month, which means when I didn't change it manually on the 31st of December at midnight, invoice sequence of 2024 will still be in 2023. Even more annoying when the fiscal year is not a calendar year!

For non accounting documents like quotations/orders that is ok, but for invoices, credit notes etc. it's not.

Or am I wrong and if I use a slash the for example 2023/CL/0999 will become 2024/CL/0001 automatically on 1/1/2024 ?

A good practices manual or some documentation on this would be nice, as it's confusing newer (v14+) versions of Odoo don't have sequence settings any more...

Avatar
Discard
Best Answer

Hi Paul,

You can add any code name there or can leave it as blank.
The code field is usually used while creating sequences from backend codes with or without conditions.
We'll be using the next_by_code() method and pass in the code to fetch the corresponding sequence code and generate the sequence accordingly.

Regards

Avatar
Discard