Odoo Help


Changing Invoice sequence numbering to include customer reference

Guillaume Rossit
on 5/17/13, 12:23 PM 23,682 views

Hi ! I can't figure out how I can set the invoice numbering to be as : "invoice-ddMM-CUSTCODEXX-invoicenumber", where : dd : day number MM : month number CUSTCODe : a customer code (Reference) XX : the invoice number for that customer invoicenumber : the invoice number

In accounting setup I already try to configure the pattern "INVOICE-(%day)(%month)", but didn't work...

Do I have to create a sales journal for each customer ?

Any idea ?

Thanks in advance

Ray Carnes
On 5/17/13, 1:59 PM

You can change the formatting of any sequence.

This includes Purchase Orders, Sales Orders, Delivery Orders, Manufacturing Orders, Invoices, etc.

Do this via the menu sequence Settings -> Technical -> Sequences and Identifiers -> Sequences

For Invoices via the Sales Journal, you will see the following when you open the relevant record:

image description

You can see that the only things you can incorporate into a sequence this way are:

  1. Fixed or date/time based prefix characters
  2. Fixed or date/time based suffix characters
  3. The total number of numerals in the number (padding) ie: 001 or 000001
  4. The increment used for the next number in the sequence
  5. The next number used for the numeric part of the sequence
  6. Whether to allow gaps in the sequence

You can see at the bottom the format for various components of the data and time.

Including a customer reference number can't be done this way - you need customization.

Hi, do you know how to do this but with code? I've created a new module that inherit invoices and add a few fields, and I needed that when I install my module the Invoice sequence "Number padding" change to 8... Thanks

Versão Integral, Anabela Damas
on 11/5/13, 1:40 PM

You would create a module that changes the above sequence with an XML record tag. https://doc.openerp.com/5.0/developer/5_16_data_serialization/xml_serialization/

Bista Solutions US, Ray Carnes
on 11/5/13, 5:48 PM

Hi @Ray Carnes: I want to initialize the invoice number every month. How can I do that ?

on 5/8/14, 11:49 AM
On 9/30/14, 6:09 AM

Does anyone know, for invoice numbers, is "Current year" the calendar year of fiscal year?

Yousif Anwar
On 9/9/16, 5:11 AM

Is there any way that I can add a contract number with auto sequence to the Fleet Management module? Thanks!

On 5/17/13, 12:33 PM


Number invoice-ddMM-CUSTCODEXX-invoicenumber you can not generate it even by expressions python.

so we must create a module to generate the invoice numbering.

Thank You.

Okay, but, where can I change the invoice sequence format ?

Guillaume Rossit
on 5/17/13, 1:00 PM

For exemple switch from "SAJ/2013/001" to "INV-052013-001" ?

Guillaume Rossit
on 5/17/13, 1:03 PM

Settings>>Accounting . Next invoice number for Customer and Supplier

on 5/17/13, 1:05 PM

Hiii, even i have a similar doubt but i want to create a number sequence for my proforma invoice to track it, can anyone please help me?

Sampath Kumar S
on 11/19/13, 5:15 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 5/17/13, 12:23 PM
Seen: 23682 times
Last updated: 9/9/16, 5:11 AM