Thursday, September 10, 2026
1 change · saas-19.4
Resolved issues and error corrections
Peruvian point-of-sale receipts are now created with the required electronic invoice QR code and summary hash available immediately after checkout. This keeps receipts legally valid without slowing down checkout by generating PDFs or emails right away.
Original PR description
In Peru, the printed PoS receipt is the legal electronic invoice/receipt (Factura/Boleta Electronica): it must carry the QR code and the summary hash from the signed e-invoice. Since 19.4, PoS…
In Peru, the printed PoS receipt is the legal electronic invoice/receipt (Factura/Boleta Electronica): it must carry the QR code and the summary hash from the signed e-invoice. Since 19.4, PoS invoice PDF/EDI generation became asynchronous by default (deferred to a cron) to speed up checkout, but l10n_pe_edi_pos was never updated to opt out of that for Peru, so the signed data doesn't exist yet when the receipt is printed right after validating the order. Steps to reproduce: ------------------- * Install l10n_pe_edi and activate SUNAT Signature Provider Setting * Create and validate a PoS order and set "invoice" to true * Print the receipt (Full Receipt or Simplified Receipt) > Observation: Neither receipt includes the QR code or the summary hash, so the printed receipt is no longer a valid electronic document. Why the fix: ------------ Forcing the whole invoice (PDF + email + e-invoice) to be generated synchronously would block checkout on a live SUNAT call, and would leave failed orders with no way to be retried by the deferred-invoice cron. PosOrder._generate_pos_order_invoice() now lets the PDF/email stay deferred to the cron as before, but posts the e-invoice to SUNAT synchronously on its own (no PDF, no email), so the receipt gets its QR code/hash right away. This matches the pattern already used by l10n_sa_edi_pos (generate_pdf=false + a synchronous EDI-only step), as opposed to l10n_co_edi_pos, the only module forcing generate_pdf=true. A chatter message is posted on the invoice if SUNAT rejects it, since calling the EDI step directly bypasses the notification that account.move.send would otherwise post. opw-6426510