Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2317 Lượt xem

Hello,

I'm trying to connect the point of sale to an external e-billing service and I need to print a signature barcode, provided by this service, in the receipt. Right now I send the order details to the service as soon as it's created in Odoo, and storing the barcode as a binary field in the order.

The problem is that I haven't been able to print the barcode into the receipt. I make an RPC call but it works asynchronously and the response is loaded only after the receipt is printed.

Does anyone know the proper way to make the receipt wait for the barcode before printing? Deferred functions haven't been of any help and I don't really understand how they work.

Thanks.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

May be you can break the flow by making it fetch the barcode first after when "Validate" button is clicked and once barcode is received then it would send for print out.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks. Unfortunately it doesn't work if the POS is configured for automate print, as the print job is triggered in parallel with the validation/server save. It does work when I reprint manually, however, so at least there's an advance, and thanks a lot for that. But I'd still need it to work for every case.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
2034
4
thg 8 25
3293
0
thg 3 25
1312
2
thg 1 25
2457
0
thg 1 25
1401