Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4201 มุมมอง

I have tried to change the odoo POS Receipt number on my print Receipt But i cant change it. It comes from randomly. Please help me to write JS Function to create a custom order receipt number..(eg: Order 00008-0003-0001)

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can find the code that generate order receipt number in point_of_sale\static\src\js\models.js

you can override the function and add your customization.

here is the origin function:
generate_unique_id: function() {
// 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

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);
},

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello sir,

Did you manage to find a solution for this?

Thank you in advance

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 22
171
0
เม.ย. 25
1371
0
พ.ย. 23
1936
0
พ.ย. 23
200
How i can modify JS method in POS? แก้ไขแล้ว
1
ก.ย. 23
7453