Odoo Help


Changing Invoice sequence numbering to include customer reference

Guillaume Rossit
on 5/17/13, 12:23 PM 26,862 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

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

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/

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!



--Borni DHIFI--
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 


Skype : dhifi.borni

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: 26862 times
Last updated: 9/9/16, 5:11 AM