Paraguay - Sifende EDI Connector
Sifende connector for Paraguay electronic invoicing.
It registers Sifende as a provider in l10n_py_edi_base. Odoo still numbers the invoices and builds the document data; Sifende signs the XML, sends it to SIFEN and returns the result and the KuDE. Odoo needs no certificate, CSC or sifen library.
Supported documents: invoice (FE), credit note (NCE), debit note (NDE), delivery note (NRE) and self-invoice (AFE).
Sending is asynchronous. After sending, the document is Processing with its CDC and QR. Sifende notifies Odoo through a webhook when SIFEN answers, and a cron that polls every 5 minutes acts as a fallback. When SIFEN approves, the document becomes Accepted with the signed XML and the KuDE attached.
Every hour the cron also polls the accepted documents that are still within their cancellation window, in case they were cancelled in Sifende and the notification was lost. Each run polls up to 200 documents per connector. Documents still waiting for SIFEN or for their files go first; the accepted documents under watch take the room that is left. Within each group the ones polled longest ago go first across all companies, so no company is left without its turn. A poll that does not change the document’s state is not written to the EDI log; failed polls and state changes are.
Table of contents
Configuration
In Sifende, create an API key for the right environment (Sandbox, Test or Production).
In Facturación electrónica > Conectores, create a connector with provider Sifende. Only one connector per company is allowed.
Choose the connector environment (Pruebas or Producción), paste the API key and, if you use your own Sifende deployment, change the base URL (HTTPS; HTTP is only accepted for localhost). Only administrators (Ajustes) can see and edit the API key and the base URL, because the URL decides where the key is sent.
Click Probar Conexión. It fails if the connector environment does not match the API key (sk_live_ is Producción; sk_sandbox_ and sk_test_ are Pruebas; the match is also checked when saving the connector and before sending, cancelling or voiding), and it warns when the timbrado, establishment or expedition point used in Odoo do not exist in Sifende.
Load the same timbrado in Sifende. An expedition point used only by Odoo is recommended: Sifende accepts the document number Odoo sends and rejects numbers already in use.
Optional: in Inventario > Configuración > Unidades de medida, set the Código de unidad de medida SIFEN of each unit (77, unit, by default).
Optional but recommended: click Registrar webhook so that Sifende notifies Odoo as soon as SIFEN answers, without waiting for the cron. Odoo must be reachable from the Internet over HTTPS, and its base URL (web.base.url, in Ajustes > Técnico > Parámetros del sistema) must be the public one: Sifende rejects http and local addresses. The button registers <web.base.url>/l10n_py_edi_sifende/webhook/<connector id> for the documento.aprobado, documento.rechazado and documento.cancelado events and stores the signing secret, visible only to administrators. If the URL was already registered in Sifende, the button says so and Rotar secreto gets a new secret. If the webhook no longer exists in Sifende, Rotar secreto forgets it and warns you: click Registrar webhook again. Quitar webhook deletes it in Sifende. Each notification only triggers a poll of the current state in Sifende, so a late notification never overwrites the real state. The cron stays active as a fallback.
With several databases on the same server, the public URL must resolve to the right database (dbfilter or the subdomain), because Sifende does not send the database name.
Access rights. Each connector is only used from its own company. Sending, retrying and cancelling a document require Contabilidad > Facturación and write access to the document; checking its status also works for read-only users. Inutilizar números and Test Connection require Contabilidad > Administrador. The API key, the base URL and the webhook require Ajustes. Delivery note transports, with their vehicles and deliveries, belong to the company of their document: other companies can neither see nor edit them, and a transport without a document yet can only be edited by its creator.
Usage
Labels are quoted as they appear on screen, in Spanish like the rest of the localization.
Post the invoice and click Enviar a EDI (only posted documents are sent). The document becomes Procesando. Once sent, the payment data (payment type, cheque, card, payment condition and due dates) and the fiscal data of the Facturación Electrónica tab (issuance, transaction, presence, receipt ID, contingency, delivery note, self-invoice, transport with its vehicles and deliveries, and associated documents) can no longer be changed. The same applies while a send is waiting for confirmation (see item 3).
The state updates by itself: Aceptado with the XML and the KuDE attached, or Rechazado with the SIFEN messages in Mensaje EDI. With the webhook registered, Sifende notifies Odoo as soon as SIFEN answers; otherwise, or if a notification is lost, the cron «Sifende: verificar estado de documentos» does it every 5 minutes.
If the document is Rechazado before reaching SIFEN (for example, a missing required field), fix the data and click Reintentar: it uses a new idempotency key. If it ends in Error because of a connection or Sifende failure before the document was registered (the message says so), Reintentar reuses the same key and nothing is duplicated; meanwhile the document cannot go back to draft and its data cannot change, so the retry sends exactly the same request. If the Error is a final failure sending to SIFEN, the document already has its CDC and number: Reintentar does not reissue it and shows the procedure instead. Retry the batch from the Sifende panel or ask support; Odoo polls the document every hour and updates it (Procesando, then Aceptado) when it is processed again with the same CDC.
In a credit or debit note, choose the Motivo de emisión in the Facturación Electrónica tab. The associated document is filled with the CDC of the original invoice when it has one. In a delivery note, also set who is responsible for the issuance and the route kilometres.
When a cash invoice or self-invoice is paid by Cheque (Tipo de Pago in the Facturación Electrónica tab), fill in the cheque number (digits only, up to 8) and the bank (4 to 20 characters): Sifende requires them. With a card, the Marca de la tarjeta is required (Otra if it is not listed).
If SIFEN rejects a document that was already sent (Rechazado with a CDC), Sifende does not accept that number again, not even with the same data, and Reintentar shows the procedure instead of sending. With Contabilidad > Administrador, open Facturación Electrónica > Inutilización de números, create a voiding with the timbrado and the number of the rejected document and click Enviar al SIFEN. Then click Restablecer a borrador and Cancelar on the rejected document and issue a new one, which takes the next number. Odoo only allows voiding numbers without a document or of rejected documents. If Sifende did not answer, Enviar al SIFEN reuses the same request: meanwhile the timbrado, the range and the reason cannot change. To void a different range, delete the voiding and create a new one.
To cancel an accepted document, click Cancelar EDI. The «Cancelar documento electrónico» wizard asks for the reason (sent to SIFEN) and confirms with Cancelar Documento. It requires Contabilidad > Facturación and the window Odoo checks (48 hours for invoices and self-invoices, 7 days for notes). Sifende does not accept cancellations in SANDBOX: the button is hidden and Odoo warns if it is attempted another way.
Once the document is Aceptado, Imprimir (the button and the reports menu) delivers the KuDE generated by Sifende, with the CDC and the QR, instead of the standard Odoo PDF. Enviar emails the KuDE as Sifende delivered it, plus the signed XML (Odoo downloads them from Sifende if needed; if Sifende does not have them yet, it warns and you can retry). While the document is not Aceptado (draft, processing, rejected or error), Enviar warns that there is no fiscal document yet, and Imprimir still prints the Odoo PDF with a «Sin validez fiscal» notice. If the document was Cancelado, Enviar does not send the KuDE and Imprimir shows the cancelled notice; the customer portal and the Imprimir > PDF menu deliver the same, and the original KuDE and XML stay stored for archiving. Automatic or batch sending does not email a pro-forma of a document that is not Aceptado either: it is left unsent with the reason in the chatter. Vendor bills and documents of other EDI providers keep the standard Odoo behaviour.
In guaraníes, Sifende rounds the total down to a multiple of 50 and requires payments and instalments to cover it (the self-invoice payment too): the connector spreads the Odoo amounts proportionally and the last instalment absorbs the difference.
If Sifende answers that the number is already in use, the document ends in Error. Raise the timbrado Número Desde to the next free number of the expedition point (see Numeración in the Sifende panel) and click Renumerar: the document takes the next free number, never one Sifende already reported, and is sent again with Enviar a EDI.
In a self-invoice, the type and number of the certificate in the Autofactura section are added as an associated document when posting or sending; there is no need to enter them again in Documentos asociados. Sifende receives only the type; the number and the control code stay in Odoo.
Every line needs a product: Sifende takes the code and the NCM from it. In a delivery note, Datos de transporte only offers transports without a document or of the same document.
The document title, the email subject and the PDF name show the fiscal type and number (for example, Nota de Débito 001-001-0000101). Odoo’s internal number (FE 00000027) is the journal’s accounting sequence and is not changed.
If Sifende answers that some configuration is missing (taxpayer data, timbrado or an expired certificate), the document ends in Error, not Rechazado: the message says what to fix in the Sifende panel; then click Reintentar.
If Sifende does not answer when cancelling a document or sending a voiding, try again: Odoo reuses the same request and the event is not duplicated. Probar Conexión warns about inactive expedition points, and Registrar webhook about a webhook disabled in Sifende.
If the partner has no department or no city Sifende recognises, invoices and notes are issued without the receiver address, because SIFEN rejects an address without a city. The delivery note requires it: choose the Ciudad SIFEN on the partner.
For air transport, each vehicle needs its Número de vuelo (6 characters), shown in the vehicle list when the Aéreo mode is chosen.
The XML and QR preview is not available: Sifende does not generate documents without issuing them.
Known issues / Roadmap
This module works around some issues of the localization. Each workaround can be removed once the issue is fixed upstream:
The asynchronous provider contract: this module overrides _process_edi_response and runs its own status cron (#97, see also #33).
Receiver ID type and delivery note motive are translated to the SIFEN codes here (#89, #92). When those are fixed upstream, the translation tables must go in the same release.
Department and city are resolved by name against the SIFEN catalog shipped with this module (#85, #86).
The partner form shows the identity document fields (#87).
Transport: carrier fields, freight responsibility 5 and creation from the invoice (#93, #94).
Payment terms, item prices with VAT and discount, unit of measure code, and number voiding (#95, #96, #98).
The extra keys this module adds to the document dict under sifende (issuance motive, unit of measure, discounts, email and customer code) should become part of the l10n_py_edi_base contract, so every provider shares them.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
ITH:
Mijhael Samaniego
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/l10n-paraguay project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Metadata
Release files for odoo-addon-l10n-py-edi-sifende 18.0.1.0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_addon_l10n_py_edi_sifende-18.0.1.0.0.1-py3-none-any.whl | Python 3 | none | any | Details for odoo_addon_l10n_py_edi_sifende-18.0.1.0.0.1-py3-none-any.whl |
Release files / odoo_addon_l10n_py_edi_sifende-18.0.1.0.0.1-py3-none-any.whl
| Download URL | odoo_addon_l10n_py_edi_sifende-18.0.1.0.0.1-py3-none-any.whl |
|---|---|
| Size | 246.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c551ba38b833be63546186dd8d93ba342b70c39260b737a1850ddef3b6e7bc80
|
|
BLAKE2b-256 checksum How to use checksums |
9927b22b0288a57c65d1910a521cc1fbd02d567a6c7a816f7eed7b05764d92d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for odoo-addon-l10n-py-edi-sifende 18.0.1.0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.