Paraguay - Sifende EDI Connector
l10n_py_edi_sifende · OCA/l10n-paraguay
-
Security19/252 minor findings
-
Activity0/25Only bot commits
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
SifendeCity— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceSifendeWebhookEvent— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
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.
Dependencies
- Odoo dependencies
- Python dependencies
- requests, cryptography, pykude, qrcode, python-stdnum, num2words
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 9
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_uom_form_view_sifende |
uom.uom.form.sifende | uom.uom | form | Inherits uom.product_uom_form_view |
report_invoice_document_sifende |
report_invoice_document_sifende | ir.ui.view | qweb | Inherits account.report_invoice_document |
view_account_authorization_form_sifende |
account.authorization.form.sifende | account.authorization | form | Inherits l10n_py_account.view_account_authorization_form |
view_edi_connector_form_sifende |
l10n_py.edi.connector.form.sifende | l10n_py.edi.connector | form | Inherits l10n_py_edi_base.view_edi_connector_form |
view_l10n_py_number_inutilization_form_sifende |
l10n_py.number.inutilization.form.sifende | l10n_py.number.inutilization | form | Inherits l10n_py_edi_base.view_l10n_py_number_inutilization_form |
view_l10n_py_transport_form_sifende |
l10n_py.transport.form.sifende | l10n_py.transport | form | Inherits l10n_py_edi_base.view_l10n_py_transport_form |
view_move_form_edi_sifende |
account.move.form.edi.sifende | account.move | form | Inherits l10n_py_edi_base.view_move_form_edi |
view_move_form_edi_sifende_remision |
account.move.form.edi.sifende.remision | account.move | form | Inherits l10n_py_edi_base.view_move_form_edi |
view_partner_form_identity_sifende |
res.partner.form.identity.sifende | res.partner | form | Inherits l10n_py_base.l10n_py_base_res_partner_form |
HTTP endpoints 1
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
| (inherited route override) | SifendeWebhookController.receive |
public | http | POST | csrf off sudo |
Models touched 24
-
l10n_py_establishmentCharrelated='establishment'string='Establecimiento (OCA)' -
l10n_py_pointCharrelated='expedition_point'string='Punto de expedición (OCA)' -
l10n_py_sifende_ultimo_numero_en_usoIntegercopy=Falsehelp='Mayor número que Sifende informó como ya usado o inutilizado en este punto de expedición. La numeración no lo reutiliza ni retrocede.'string='Último número en uso en Sifende'
No public methods.
-
l10n_py_sifende_aviso_fiscalCharcompute='_compute_l10n_py_sifende_aviso_fiscal'string='Aviso fiscal (Sifende)'
-
action_print_pdf(self) -
action_send_and_print(self)
-
l10n_py_sifende_afe_provision_city_idMany2one → l10n_py.sifende.citycompute='_compute_l10n_py_sifende_afe_provision_city_id'inverse='_inverse_l10n_py_sifende_afe_provision_city_id'string='Ciudad de provisión' args: 'l10n_py.sifende.city' -
l10n_py_sifende_afe_vendor_city_idMany2one → l10n_py.sifende.citycompute='_compute_l10n_py_sifende_afe_vendor_city_id'inverse='_inverse_l10n_py_sifende_afe_vendor_city_id'string='Ciudad del vendedor' args: 'l10n_py.sifende.city'
-
create(self, vals_list)@api.model_create_multi -
write(self, vals)
-
l10n_py_authorization_idMany2onecompute='_compute_l10n_py_authorization_id'readonly=Falsestore=True -
l10n_py_receipt_idCharstring='ID de recibo' -
l10n_py_sifende_archivos_pendientesBooleancopy=False -
l10n_py_sifende_cdc_existenteCharcopy=Falsereadonly=True -
l10n_py_sifende_cheque_bancoCharcopy=Falsestring='Banco del cheque (SIFEN)' -
l10n_py_sifende_cheque_numeroCharcopy=Falsestring='Número del cheque (SIFEN)' -
l10n_py_sifende_enabledBooleancompute='_compute_l10n_py_sifende_enabled' -
l10n_py_sifende_envio_fallidoBooleancopy=False -
l10n_py_sifende_event_keyCharcopy=Falsereadonly=True -
l10n_py_sifende_frozenBooleancompute='_compute_l10n_py_sifende_frozen' -
l10n_py_sifende_intentoIntegercopy=Falsedefault=0readonly=Truestring='Intento de envío a Sifende' -
l10n_py_sifende_km_recorridoIntegerstring='Kilómetros del recorrido (NRE)' -
l10n_py_sifende_motivo_emisionSelectioncompute='_compute_l10n_py_sifende_motivo_emision'copy=Falsereadonly=Falsestore=Truestring='Motivo de emisión (SIFEN)' args: [('1', 'Devolución y ajuste de precios'), ('2', 'Devolución'), ('3', 'Descuento'), ('4', 'Bonificación'), ('5', 'Crédito incobrable'), ('6', 'Recupero de costo'), ('7', 'Recupero de gasto'), ('8', 'Ajuste de precio')] -
l10n_py_sifende_numero_ocupadoBooleancopy=Falsereadonly=True -
l10n_py_sifende_reintento_misma_claveBooleancopy=False -
l10n_py_sifende_responsable_emisionSelectiondefault='1'string='Responsable de la emisión de la NRE' args: [('1', 'Emisor de la factura'), ('2', 'Poseedor de la factura y bienes'), ('3', 'Empresa transportista'), ('4', 'Despachante de aduanas'), ('5', 'Agente de transporte o intermediario')] -
l10n_py_sifende_sandboxBooleancompute='_compute_l10n_py_sifende_sandbox' -
l10n_py_sifende_tarjeta_marcaSelectioncopy=Falsestring='Marca de la tarjeta (SIFEN)' args: [('1', 'Visa'), ('2', 'Mastercard'), ('3', 'American Express'), ('4', 'Maestro'), ('5', 'Panal'), ('6', 'Cabal'), ('99', 'Otra')] -
l10n_py_sifende_ultima_consultaDatetimecopy=Falsereadonly=True
-
action_cancel_edi(self) -
action_l10n_py_sifende_renumber(self) -
action_post(self) -
action_retry_edi(self) -
action_send_edi(self) -
button_draft(self) -
write(self, vals)
-
l10n_py_sifende_document_nameCharcompute='_compute_l10n_py_sifende_document_name'string='Documento fiscal'
No public methods.
No new fields.
Public methods (1)-
write(self, vals)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (1)-
action_send(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (3)-
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
No new fields.
Public methods (1)-
action_cancel(self)
No new fields.
Public methods (3)-
action_sifende_register_webhook(self) -
action_sifende_remove_webhook(self) -
action_sifende_rotate_webhook_secret(self)
-
activeBooleanstring='Activo' -
company_idMany2onestring='Empresa' -
environmentSelectionstring='Ambiente' -
provider_typeSelectionondelete={'sifende': 'cascade'}selection_add=[('sifende', 'Sifende')] -
sifende_ambienteCharcopy=Falsereadonly=Truestring='Ambiente de la API key' -
sifende_api_keyCharcopy=Falsegroups='base.group_system'string='API key de Sifende' -
sifende_base_urlChardefault=DEFAULT_BASE_URLgroups='base.group_system'string='URL de Sifende' -
sifende_webhook_idIntegercopy=Falsegroups='base.group_system'readonly=Truestring='Webhook en Sifende' -
sifende_webhook_secretCharcopy=Falsegroups='base.group_system'string='Secreto del webhook' -
sifende_webhook_urlCharcompute='_compute_sifende_webhook_url'string='URL del webhook' -
timeoutIntegerstring='Tiempo de espera (segundos)'
-
cancel_document(self, document_id, reason='')@api.private -
check_status(self, document_id)@api.private -
inutilize_range(self, data)@api.private -
preview_document(self, invoice_data)@api.private -
preview_qr(self, invoice_data)@api.private -
send_document(self, invoice_data)@api.private -
test_connection(self) -
write(self, vals)
-
providerSelectionondelete={'sifende': 'cascade'}selection_add=[('sifende', 'Sifende')]
No public methods.
-
l10n_py_sifende_event_keyCharcopy=Falsereadonly=True
-
action_send(self) -
write(self, vals)
-
codeIntegerrequired=Truestring='Código de ciudad' -
department_codeIntegerrequired=Truestring='Código de departamento' -
department_nameCharrequired=Truestring='Departamento' -
district_codeIntegerrequired=Truestring='Código de distrito' -
district_nameCharrequired=Truestring='Distrito' -
nameCharindex=Truerequired=Truestring='Ciudad'
No public methods.
No new fields.
Public methods (3)-
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
-
connector_idMany2one → l10n_py.edi.connectorindex=Trueondelete='cascade'required=True args: 'l10n_py.edi.connector' -
event_idCharrequired=True -
event_typeChar
-
register(self, connector, event_id, event_type)@api.modelDevuelve False si el evento ya estaba registrado.
-
freight_responsibilitySelectionselection_add=[('5', 'Transporte propio (E905)')] -
move_idMany2onerequired=False -
sifende_agent_addressCharsize=255string='Dirección del agente (E997)' -
sifende_agent_dvCharsize=1string='DV del agente (E996)' -
sifende_agent_nameCharsize=60string='Nombre del agente (E994)' -
sifende_agent_rucCharsize=8string='RUC del agente (E995)' -
sifende_departure_city_idMany2one → l10n_py.sifende.citycompute='_compute_sifende_departure_city_id'inverse='_inverse_sifende_departure_city_id'string='Ciudad de salida' args: 'l10n_py.sifende.city' -
sifende_driver_addressCharsize=255string='Dirección del chofer (E993)' -
sifende_import_dispatchCharsize=16string='Despacho de importación (E908)' -
sifende_transporter_addressCharsize=150string='Domicilio fiscal del transportista (E992)' -
sifende_transporter_document_numberCharsize=20string='Documento del transportista (E987)' -
sifende_transporter_document_typeSelectionstring='Tipo de documento del transportista (E985)' args: DOCUMENT_TYPES
-
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
-
cityIntegerrequired=False -
departmentIntegerrequired=False -
sifende_city_idMany2one → l10n_py.sifende.citycompute='_compute_sifende_city_id'inverse='_inverse_sifende_city_id'string='Ciudad' args: 'l10n_py.sifende.city'
No public methods.
-
sifende_flight_numberCharsize=6string='Número de vuelo (E967)'
No public methods.
-
l10n_py_sifende_city_idMany2one → l10n_py.sifende.cityhelp='Sólo hace falta si Sifende no reconoce la ciudad del contacto: se envía esta en lugar de deducirla del nombre.'string='Ciudad SIFEN' args: 'l10n_py.sifende.city'
No public methods.
-
l10n_py_sifende_unidad_medidaIntegerdefault=77help='Código del catálogo de unidades de medida de SIFEN (77 = Unidad).'string='Código de unidad de medida SIFEN'
No public methods.