Skip to Content
Menu
This question has been flagged
1 Reply
1911 Views

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.

Avatar
Discard
Best Answer

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.

Avatar
Discard
Author

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.

Related Posts Replies Views Activity
2
Dec 24
72
3
Nov 24
2212
0
Sep 24
116
3
Sep 24
1306
0
Sep 24
110