Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Localisation
  3. Romania - ANAF Declaration DUKIntegrator v 19.0
  4. Sales Conditions FAQ

Romania - ANAF Declaration DUKIntegrator

by NextERP Romania https://www.nexterp.ro
Odoo

$ 5770.00

v 19.0 Third Party
This module requires Odoo Enterprise Edition.
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
• Inventory (stock)
Community Apps Dependencies Show
• Romania - ANAF Declaration
• Romania - Account Enterprise
• NextERP Base
Lines of code 4259
Technical Name l10n_ro_declaration_duk
LicenseOPL-1
Websitehttps://www.nexterp.ro
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
• Inventory (stock)
Community Apps Dependencies Show
• Romania - ANAF Declaration
• Romania - Account Enterprise
• NextERP Base
Lines of code 4259
Technical Name l10n_ro_declaration_duk
LicenseOPL-1
Websitehttps://www.nexterp.ro
  • Description
  • License
Romania - ANAF Declaration DUKIntegrator icon

Romania - ANAF Declaration DUKIntegrator

Validate ANAF declarations against the NextERP DUKIntegrator HTTP service.

v 19.0.0.2.4 LocalisationOPL-1
  • Overview
  • Features
  • Configuration
  • How it works
  • Versions

Overview

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 downloads it.

DUKIntegrator itself is the official ANAF-shipped Java tool: it cannot be installed on read-only addon paths like Odoo.sh and ships ~200 MB of jars plus the JVM and ANAF schema files. This module runs the tool once on a dedicated host (duk.nexterp.ro by default) and reaches it over HTTPS from the Odoo server.

What you get:

  • a configuration block under Accounting Settings with the service URL, shared API key, request timeout and an enable/disable switch;
  • a generic l10n.ro.anaf.mixin override that POSTs the XML right after the local XSD check, persists DUK's verdict (valid / invalid / skipped) and stores the returned PDF as an attachment;
  • a view extension that surfaces the DUK badge, the validation log and the PDF on every declaration wizard (D100, D300, D390, D394, D406, D120, ...) without any per-declaration code change;
  • safety rails for non-production databases (neutralized, localhost, unit tests) so staging reruns never alert the production helpdesk.

NextERP Romania

Built & supported by NextERP Romania

Romanian Odoo specialists, here for the long run — from implementation to localization and day-to-day production support.

10+
Years of Odoo experience per team member
80%+
of Romanian Localization maintained on Odoo Apps
19.0
Tracking every Odoo major release

What we do

⚙️

Odoo Solutions

From quick-start rollouts to multi-company deployments and custom modules built for your processes.

🇷🇴

Romanian Localization

SAF-T (D406), e-Factura, e-Transport, D300 / D390 / D394, ANAF integration, full chart of accounts and fiscal positions.

🛟

Our Services

Implementation, customization, migration, integration, support and consultancy — Romanian-speaking, SLA-backed.

Features

  • Generic mixin override — extends l10n.ro.anaf.mixin.validate_xml so every wizard built on the shared base (D100, D101, D300, D390, D394, D406, D120, Intrastat, Bilant ...) is validated through DUK automatically; no per-declaration code change required.
  • HTTP client to the NextERP DUKIntegrator service — multipart POST to <url>/validate with the declaration code, basename and XML payload, X-API-Key auth, JSON reply parsed into DukValidationResult.
  • Verdict persisted on the wizard — duk_state (not_run / valid / invalid / skipped), duk_log (DUK stdout or the infrastructure error), duk_pdf (printable form returned by DUK, stored as attachment) and duk_pdf_filename.
  • Inline UI on every wizard — a DUKIntegrator Validation block is injected into the base wizard view, with a coloured badge, the log textarea and a download link for the PDF when the declaration is accepted.
  • Soft-fail on production — infrastructure problems (DNS, TLS, HTTP 5xx, timeouts, malformed JSON) become skipped instead of blocking the wizard; the XML is still saved and the user can retry.
  • Hard-fail on non-production — neutralized DBs, localhost base URL, test_enable or current_test flags raise UserError on rejection / skip so failures surface immediately during development.
  • Per-declaration code override — wizards covering multiple ANAF codes through versions (e.g. l10n.ro.anaf.bilant → S1002/S1014/...) override _get_duk_declaration_code() to send the version-correct -p argument.
  • Production-only alert mail — the service's failure email is suppressed (send_alert=false) outside production, so staging reruns never open Helpdesk tickets.
  • Bundled defaults via noupdate="1" — URL, timeout and the enable flag are seeded but admin overrides survive upgrades.

Configuration

Go to Accounting -> Configuration -> Settings and locate the ANAF DUKIntegrator Service block in the Fiscal Localizations section. The block is only visible when the current company is set to Romania.

Fill in:

  • Enable DUK Validation — master switch. When off, every wizard returns a skipped result without contacting the service.
  • Service URL — base URL of the validator (default https://duk.nexterp.ro). Leave empty to bypass validation without touching the enable flag.
  • API Key — shared secret sent in the X-API-Key header on every request. The field is masked (password="True").
  • Timeout (seconds) — request timeout. SAF-T (D406) validations on large files can take a few minutes; 300 s is a safe default.

Defaults for URL, timeout and the enable flag are seeded by data/ir_config_parameter_data.xml with noupdate="1", so admin overrides survive module upgrades.

How the test-environment detection works

The mixin checks three signals to decide whether the database is a production one. If any of them is true, DUK alert emails are suppressed and validation failures raise immediately instead of being silently logged:

Signal Source
tools.config['test_enable'] / modules.module.current_test Odoo's own unit-test flags
database.is_neutralized set to True / 1 odoo neutralize or Odoo.sh staging
web.base.url contains localhost or 127.0.0.1 Developer laptops

You don't have to configure anything; the behaviour is automatic. A neutralized DB will simply never trigger a Helpdesk ticket from the service even if every declaration in it fails validation.

Storage

DUK results are stored on the wizard record itself (transient model): duk_state, duk_log, duk_pdf (as attachment=True binary) and duk_pdf_filename. There is nothing to clean up; the records are garbage-collected with the standard transient cleanup cron.

How it works

1. Run any declaration wizard

Open any ANAF declaration wizard from Accounting -> Reporting -> Romania (D100, D300, D390, D394, D406, D120, Intrastat ...) and click Execute as you normally would.

Internally:

  1. the underlying declaration model builds the XML;
  2. the shared l10n.ro.anaf.mixin.validate_xml runs the local XSD check first;
  3. this module's override then POSTs the XML to <service_url>/validate with X-API-Key auth, the declaration code (D300, S1002, ...) and the basename <CODE>-<VAT>-<YYYY>-<MM>;
  4. the JSON reply is translated into a DukValidationResult and persisted on the wizard.

2. Read the verdict

After Execute, the wizard re-renders with the DUKIntegrator Validation block visible. It shows three pieces of information:

  • DUK Validation — coloured badge:
    • Valid (green) — DUK accepted the declaration;
    • Invalid (red) — DUK rejected it; DUK Validation Log contains the rejection reason;
    • Skipped (orange) — infrastructure problem (service down, timeout, missing config), the XML is still saved and you can retry.
  • DUK PDF — when DUK accepted the declaration and produced a printable form, click to download.
  • DUK Validation Log — DUK's stdout / err.txt on rejection, warnings on success, or the infrastructure error that caused the skip. Hidden when the log is empty or equal to "ok".

The Report File field always carries the generated XML, even on rejection — fix the source data and re-run the wizard, or download the (rejected) XML if you have a reason to.

3. Special cases

  • Non-production databases: rejection and skip raise a UserError instead of being silently logged, so the failure surfaces immediately during development.
  • Multiple declaration codes per wizard: wizards like l10n.ro.anaf.bilant (mapping to S1002 / S1014 / S1039 / S1070 via the version record) override _get_duk_declaration_code() to send the right -p argument to DUKIntegrator.
  • Service outage: turn off Enable DUK Validation from the Accounting Settings to keep generating declarations until the service is back.

Versions

19.0.0.2.4 (2026-05-24)

  • Changelog tracking starts at this release.

Discover the NextERP suite

Other modules from the same publisher, built to work together.

RO
Romania - ANAF Declaration
Localisation

Romania - ANAF Declaration

RO
Romania - Account Report Purchase Journal
Localisation

Romania - Account Report Purchase Journal

RO
Romania - Account Report Sale Journal
Localisation

Romania - Account Report Sale Journal

RO
Romania - D100 / 710 ANAF Declaration
Localisation

Romania - D100 / 710 ANAF Declaration

RO
Romania - D101 ANAF Declaration
Localisation

Romania - D101 ANAF Declaration

RO
Romania - D120 ANAF Declaration
Localisation

Romania - D120 ANAF Excise Duties Declaration (Decont privind accizele).

RO
Romania - D300 ANAF Declaration
Localisation

Romania - D300 ANAF Declaration

RO
Romania - D390 ANAF Declaration
Localisation

Romania - D390 ANAF Declaration

NextERP Romania

Odoo implementation, customization, Romanian localization and long-term support since 2018.

nexterp.ro
All apps
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

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with