Odoo Help


How to change point-of-sale receipt order number?

Anas Taji
on 3/30/13, 8:02 PM 6,460 views

Hi all,,

Point of sale printed receipt contains a Order number (most upper right corner) which is generated to be unique based on the current time, I found the responsible javaScript function (generateUniqueId) under


The question is, how to change the order to start from 0 each session? is there any way to achieve this without changing the source code?



Anas Taji

--Anas Taji--
| 6 7 8
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji
On 5/13/13, 1:03 AM

Found a solution.

I have defined a new variable at the top of the script var orderNo=0;, then changed the funcion to:

generateUniqueId: function() {
    return orderNo++;

Its silly, right!

"I have defined a new variable at the top of the script var orderNo=0 " ...where exactly...Got a blank screen after attempting to change this? Anyway to get this field from a sequence?

on 6/24/13, 8:56 AM

You should try to place the variable definition as the second line of the script..%

Smart Way Business Solutions, Anas Taji
on 6/24/13, 5:07 PM

hi.. Thanks Anas . It works for me.

on 9/27/13, 4:05 AM

hi. Anas any idea about how to set different order number for different users of pos. For example if user1 need the order number start with 1000, user2 needs to start the order number with 2000, how can be achieve it.

on 9/28/13, 2:46 AM

Simple but useful tip. Thanks!

Luis Leiva
on 10/3/13, 12:22 PM

But the variable is set to 0 each time the POS reloads... ) : Could it be possible to import the current POS order number when pos interface is loaded in models.js to the orderNo variable so it takes off from the last order in the server??

Luis Leiva
on 10/5/13, 12:03 AM

Using something like this.... return self.fetch('pos.order', ['name']); }).then(function(pos){ OrderNo ..... .... ?? Someone?

Luis Leiva
on 10/5/13, 12:05 AM



| 3 2 6
Gandhinagar, India

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.

Skype : acespritech

Email : info@acespritech.com

On 5/23/13, 6:57 AM

Hello !

We have created a separate module to generate POS Sequence.
User can generate his own sequence number as per his requirement.

Please check this blog.
Just copy this URL and paste in browser.

Acespritech Solutions Pvt. Ltd.
Mail: info@acespritech.com
Skype: acespritech
Gtalk: acespritech

Abner Galeno Jr.
On 3/31/13, 10:10 AM

I'm don't how easy or hard it is to get that feature but I just know that IntellectSeed made this modified POS module..

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

1 follower(s)


Asked: 3/30/13, 8:02 PM
Seen: 6460 times
Last updated: 3/16/15, 8:10 AM