Metadata-Version: 2.4
Name: unpaismejor_party_dgii_rnc_lookup
Version: 8.0.5
Summary: Dominican DGII RNC lookup for Tryton parties
Project-URL: homepage, https://www.unpaismejor.org.do/
Project-URL: repository, https://code.unpaismejor.org.do/tryton-do/party_dgii_rnc_lookup
Author: Fundación Un País Mejor
Maintainer-email: Fundación Un País Mejor <jgarcia@unpaismejor.org.do>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: dgii,dominican-republic,party,rnc,tryton
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: trytond-party<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Requires-Dist: proteus<8.1,>=8.0; extra == 'test'
Description-Content-Type: text/x-rst

Party DGII RNC Lookup
#####################

Tryton 8.0 module to synchronize Dominican party information from a DGII RNC
lookup API.

The module extends ``party.party`` with a DGII tab and a ``Consultar DGII``
button. It stores the official name, commercial name, tax status, activity,
local administration, electronic invoicing status and the raw API payload.

Document Lookup
---------------

Manual lookup uses the first Dominican identifier found on the party:

* ``do_vat``
* ``do_cedula``
* ``do_rnc``

If no Dominican identifier exists, the party name is used as a fallback. This
keeps the quick workflow where a new party can be saved with the RNC or cedula
temporarily in ``name`` and then synchronized from DGII.

API
---

No gateway URL is enabled by default. Configure an authorized service that
implements one of these contracts:

* ``GET /api/v1/rnc/{document_number}``
* ``POST /api/v1/rnc/lookup``

Configuration is available on ``party.configuration``.

The gateway is a configurable integration service, not an official public
DGII API. DGII officially provides the web consultation and downloadable RNC
lists. Deployments must verify the provider's authorization, availability,
contract and data-processing terms. The module validates Dominican check
digits and never accepts a response whose document differs from the requested
RNC or cédula.

Cron
----

The module adds an ``ir.cron`` method to synchronize Dominican identifiers in
batches. The cron can update the party name when enabled in configuration.
