[FIX] point_of_sale: the order reference used the session sequence number wich was not unique accross sessions on different point_of_sales.

Now we are using the session id which is unique, but is less understandable
This commit is contained in:
Frederic van der Essen 2014-08-26 12:38:35 +02:00
parent f1d4d8d86c
commit 73fc6419a9
1 changed files with 1 additions and 2 deletions

View File

@ -176,7 +176,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
domain: function(self){ return [['state','=','opened'],['user_id','=',self.session.uid]]; },
loaded: function(self,pos_sessions){
self.pos_session = pos_sessions[0];
self.pos_session_id = parseInt(self.pos_session.name.split('/')[1]);
var orders = self.db.get_orders();
for (var i = 0; i < orders.length; i++) {
@ -929,7 +928,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
}
return s;
}
return zero_pad(this.pos.pos_session_id,5) +'-'+
return zero_pad(this.pos.pos_session.id,5) +'-'+
zero_pad(this.pos.pos_session.login_number,3) +'-'+
zero_pad(this.sequence_number,4);
},