Reputation: 805
In odoo 8,there is a field named Receipt Ref
(technical name pos_referance
. I want to know about how this value is created.
For eg: If pos_referance
is 27574-004-04-0003 , what does 27574
, 004
, 04
and 0003
stands for ?
Upvotes: 0
Views: 408
Reputation: 355
This number is generated from the JavaScript file located at addons/point_of_sale/static/src/js/models.js
In this file you can find one model names "Order", inside this model one method is there which is responsible for this sequence. Please have a look below for that method.
generateUniqueId: function() {
function zero_pad(num,size){
var s = ""+num;
while (s.length < size) {
s = "0" + s;
}
return s;
}
return zero_pad(this.pos.pos_session.id,5) +'-'+
zero_pad(this.pos.pos_session.login_number,3) +'-'+
zero_pad(this.sequence_number,4);
},
Upvotes: 1