Q:如题,在Odoo 8.0中,怎么修改POS收据中的pos_reference序列号?
这个序列号的格式是这样的:Commande 00015-005-0009,但不是ir.sequence类型A:生成数字的源码在addons/point_of_sale/static/src/js/models.js中。
可以根据自己的需求,对如下方法中的代码作修改:
// Generates a public identification number for the order.
// The generated number must be unique and sequential. They are made 12 digit long
// to fit into EAN-13 barcodes, should it be needed
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);
},
来源:苏州远鼎官网