Romania - ANAF Declaration DUKIntegrator
by NextERP Romania https://github.com/NextERP-Romania/l10n-romania-enterprise$ 5880.00
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 3929 |
| Technical Name |
l10n_ro_declaration_duk |
| License | OPL-1 |
| Website | https://github.com/NextERP-Romania/l10n-romania-enterprise |
Romania - ANAF Declaration DUKIntegrator

This module hooks the NextERP DUKIntegrator HTTP service into the ANAF declaration wizards so the generated XML is validated (and a printable PDF returned) before the user saves it.
DUKIntegrator itself is the ANAF-shipped Java tool. Running it locally on every Odoo host is impractical (~200 MB of jars + JVM + ANAF schema files), so we run it once on duk.nexterp.ro and reach it over HTTPS. This module ships the Odoo-side client: configuration, mTLS-free auth via X-API-Key, an enable/disable toggle, and a wizard form extension that surfaces DUK’s verdict (valid / invalid / skipped), the validation log and the produced PDF directly on every declaration wizard.
Table of contents
Configuration
Go to Accounting -> Configuration -> Settings, find the ANAF DUKIntegrator Service block (only visible for Romanian companies) and fill:
- Enable DUK Validation — master switch. Off means every wizard returns a “skipped” result without contacting the service.
- Service URL — base URL of the validator (default https://duk.nexterp.ro).
- API Key — shared secret sent in the X-API-Key header on every request.
- Timeout (seconds) — request timeout. SAF-T (D406) validations on large files can take a few minutes; 300s is a safe default.
Defaults for URL, timeout and the enable flag are seeded by the module’s data file (noupdate="1"), so admin overrides survive upgrades.
Usage
Open any declaration wizard (D300, D390, D394, D406, …) and click Execute as you normally would. The XML is generated, validated against the local XSD, and – if DUK validation is enabled – POSTed to the configured service.
The wizard re-renders with three new fields populated:
- DUK Validation — coloured badge: Valid (green), Invalid (red), Skipped (orange).
- DUK PDF — when DUK accepted the declaration and produced the printable form, the PDF is attached here for download.
- DUK Validation Log — DUK’s stdout / err.txt on rejection, warnings on success, or the infrastructure error that caused a skip.
Rejection no longer aborts the wizard. The XML is still saved to Report File and the user can either fix the data and re-run, or download the (rejected) XML if they have a reason to.
Bug Tracker
Bugs are tracked on NextERP Issues. In case of trouble, please check there if your issue has already been reported.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- NextERP Romania
Contributors
- NextERP Romania:
- Fekete Mihai <feketemihai@nexterp.ro>
Maintainers
Current maintainer:

This module is part of the NextERP-Romania/l10n-romania-enterprise project on GitHub.
You are welcome to contribute.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module