Tuesday, May 19, 2026
1 change · master
New functionality added to Odoo
This update enables Peruvian withholding agents to automatically generate and submit electronic retention documents (Comprobantes de Retención) to SUNAT. It streamlines the process of sending UBL 2.0 XML files via SUNAT, Estela, or IAP, ensuring compliance with local regulations. The changes improve reusability and flexibility for handling retention payments.
Original PR description
Appointed withholding agents in Peru need to submit a Comprobante de Retención to SUNAT when paying vendor bills with IGV retention. This module handles generating the UBL 2.0 XML, signing it, and sending it to SUNAT's Otroscpe endpoint. Supports SUNAT, Estela, and IAP providers. Also refactors `l10n_pe_edi` to extract `_l10n_pe_edi_send_bill_sunat_estela` as a reusable `@api.model` method and fixes the `@api.model` annotations on shared helpers (`_l10n_pe_edi_sign`, `_l10n_pe_edi_decode_soap_response`, `_l10n_pe_edi_extract_cdr_status`) so they can be called from other models. task-4980644 odoo/odoo#259771