| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 6003 |
| Technical Name |
l10n_ro_declaration_D394 |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 6003 |
| Technical Name |
l10n_ro_declaration_D394 |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 18.0 19.0 |
Romania - D394 ANAF Declaration
Romania - D394 ANAF Declaration
Overview
This module generates the D394 declaration (Declarația informativă privind livrările/prestările și achizițiile efectuate pe teritoriul național) for Romanian ANAF. D394 is the informative recapitulative declaration of domestic operations filed by every Romanian VAT-registered taxpayer to report all supplies and acquisitions of goods and services performed on Romanian territory with partners (other Romanian companies, individuals or non-residents without an EU VAT number) that are not covered by the intra-Community D390.
The filing period follows the company's VAT period (monthly or quarterly). The declaration lists every domestic partner together with the aggregated base and VAT amounts split by VAT rate (5%, 9%, 11%, 19%, 20%, 21%, 24%) and partner type (taxable persons registered for VAT — section A, taxable persons not registered for VAT — section B, non-taxable individuals — sections C/D, etc.). It also reports cash-basis VAT (TVA la încasare) payments collected in the period, fiscal receipts, simplified invoices and sector-specific operations (real estate, mobile phones, cereals, energy).
Output is an XML conformant to the ANAF schema. Three versions are bundled — v3 (in force 2021-01-01), v4 (2022-04-01) and v5 (2025-09-01, current). The wizard exposes a long checklist of operation categories so the accountant can confirm which sections apply to the period.
Built & supported by NextERP Romania
Romanian Odoo specialists, here for the long run — from implementation to localization and day-to-day production support.
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
- Domestic operations recap — wizard
l10n.ro.anaf.d394generates<declaratie394>for every Romanian taxpayer's monthly or quarterly filing. Period is taken from the wizardDate From/Date Torange. - Three schema versions bundled —
v3(d394_20200902.xsd, 2021-01-01),v4(d394_20220510.xsd, 2022-04-01),v5(d394_20250915.xsd, 2025-09-01). The wizard picks the version whosedate_fromis the most recent that does not exceed the period end. - Per-partner aggregation — every posted sale and purchase invoice
is grouped by partner; the wizard emits one
<op1>block per partner plus one or more<op11>children per operation type. Aggregation uses the sharedget_journal_line_valshelper froml10n.ro.anaf.mixin. - VAT rates split — base and VAT are reported separately per rate
(
baza5/tva5,baza9/tva9,baza11/tva11,baza19,baza20,baza21,baza24and so on as new rates are added). The module ships rate-specific column dictionaries reused across versions. - Partner type segmentation —
l10n_ro_partner_typedrives which section of D394 the partner falls into (1Romanian VAT,2Romanian non-VAT,3intra-EU — reported in D390 instead,4non-resident outside EU). - VAT on payment (TVA la încasare) —
sistemTVAis set frompartner._check_vat_on_payment()at the period end date. VAT on payment invoices are merged with their reconciled payments viaget_payment_vals, splitting the rates and totals into the dedicated columns. - Refund-request operation flags — when
solicitis ticked the wizard exposes a long check-box list (achizitiiPE,achizitiiCR,achizitiiCB,achizitiiCI,achizitiiA,achizitiiB5–achizitiiB24,achizitiiS5–achizitiiS24,importB,acINecorp,livrariBI,BUN5–BUN24,valoareScutit,BunTI,Prest5–Prest24,PrestScutit,LIntra,PrestIntra,Export,livINecorp). - ANAF crosschecking option —
l10n_ro_optiuneis stored onres.companyso the value is persistent; the wizard exposes the current value and aschimb_optiuneflag if changed for this filing. - Interactive report — the bundled
anaf_d394_report(account.report.custom.handler) lets accountants drill down from each<op1>line into the source move lines and inspect the rate-by-rate totals before generating XML. - XSD validation before download — output is validated against the matching ANAF XSD attached to the version record.
Configuration
1. Prerequisites
Complete the setup described in the l10n_ro_declaration base module shipped with this one:
- Romanian VAT/CUI on the company.
- The CAEN code on the company (required in the D394 XML
caenattribute). - At least one ANAF signature under Accounting → Configuration → Romania → ANAF Signatures.
- The company bank account, address, phone and e-mail.
- A VAT on payment flag, if applicable — the wizard checks
_check_vat_on_payment()for the period and emitssistemTVA = 1for taxpayers under TVA la încasare.
2. ANAF cross-checking option
D394 includes the legal option whereby the taxpayer accepts cross-check of its declaration with declarations submitted by partners. The toggle lives on the company:
res.company.l10n_ro_optiune— set under Settings → Accounting → Romanian Localization → ANAF Crosschecking.- The wizard inherits the value through the
optiunefield and exposes a separateschimb_optiuneflag if the company changes its option for this filing.
3. Partner setup
For every partner used in domestic operations:
- The Romanian VAT/CUI (or CNP for individuals).
- The
l10n_ro_partner_typeshould be set correctly (1Romanian company with VAT,2Romanian without VAT,4non-resident without EU VAT, etc.) — D394 segments are driven by this classification. - Affiliated partners (group entities) should be flagged so the
prsAfiliatindicator is checked when needed.
4. Product / operation categories
D394 reports many specific categories using the product l10n_ro_anaf_code
field shipped by l10n_ro_declaration. Configure the code on each
product so the wizard can route sales of mobile phones, laptops, game
consoles, cereals, real estate, energy and intangibles into the correct
section.
5. Wizard location
Open the wizard at Accounting → Reports → Romania → D394 Declaration.

The wizard automatically selects the right XSD version based on the
period end date — v3 (d394_20200902.xsd, in force 2021-01-01), v4
(d394_20220510.xsd, 2022-04-01) or v5 (d394_20250915.xsd,
2025-09-01).
6. Run the declaration
After configuration, generate the declaration as described in USAGE.md.
How it works
D394 is exposed in two complementary ways:
- as an interactive report under
Accounting → Reports → Romania → D394 (the
anaf_d394_reportrecord), which lists every aggregated operation by partner and lets you drill down to the source invoices; - as a wizard under Accounting → Reports → Romania → D394 Declaration used to generate the ANAF XML file.

Steps
-
Header fields
- Declaration / Version — defaults to
D394 / Versiunea 5(orv4/v3depending on the period). - Date From / Date To — the VAT period (monthly or quarterly).
- Signature — the ANAF signature record for the declarant.
- Representative — fill only if a fiscal representative is filing on behalf of the company.
- Declaration / Version — defaults to
-
Cross-checking option
- ANAF Crosschecking (
optiune) — read-only, inherited fromres.company.l10n_ro_optiune. - Allow ANAF Crosschecking (
schimb_optiune) — tick if the option is changed for this filing.
- ANAF Crosschecking (
-
Operations indicators
- Operations with affiliated companies (
prsAfiliat) — tick if the period includes operations with affiliated entities. - Request VAT Reimbursement (
solicit) — tick to request a refund and expose the long list of category check-boxes below. Whensolicitis on, indicate the categories present in the period: real estate by type (residential / office / industrial / wind farms / other), goods and services by VAT rate (5% / 9% / 11% / 19% / 20% / 21% / 24%), imports, intangible assets, exports, intra-Community supplies of goods and services, intangibles supplied, sales of real estate, sales with reverse charge.
- Operations with affiliated companies (
-
Get Report — generates the XML, validates it against the matching ANAF XSD and attaches the file to the wizard. Internally:
- The wizard reads every posted invoice in the period (sales and
purchases), classifies the partner (
l10n_ro_partner_type) and the operation type (l10n_ro_operation_type). - For each partner it aggregates base + VAT by rate (5/9/11/19/20/21/24)
using the
get_journal_line_valshelper froml10n.ro.anaf.mixin. - VAT on payment invoices are merged with their reconciled payments in
the period via
get_payment_valsand reported under the dedicated payment columns. - Partners are emitted as
<op1>records (header) with<op11>children per detailed line.
- The wizard reads every posted invoice in the period (sales and
purchases), classifies the partner (
-
PDF-style report — print the
anaf_d394_reportfrom the wizard for internal review. -
Validate with DUKIntegrator — run ANAF's local validator before signing.
-
Sign with the digital signature (Sectigo / certSIGN / other token).
-
Upload to ANAF at the Depunere declarații portal under D394.
Generated XML — key fields
- Root
<declaratie394>withluna,an,cui,den,caen,adresa,sistemTVA(1 if the taxpayer applies VAT on payment),optiune,schimb_optiune,prsAfiliat,solicit, plus thetip_intocmit,den_intocmit,cif_intocmit,functie_intocmitdeclarant block and the optionalcifR/denR/adresaRrepresentative block. - One
<op1>per partner withcif_par,den_par, partner type and aggregated totals. <op11>children per operation type withbaza<rate>,tva<rate>, number of invoices and VAT-on-payment columns.
Schema versions
| Version | XSD | In force from |
|---|---|---|
| v3 | d394_20200902.xsd |
2021-01-01 |
| v4 | d394_20220510.xsd |
2022-04-01 |
| v5 | d394_20250915.xsd |
2025-09-01 |
Screenshots
Captured from a running Odoo instance.
Action run declaration394
Versions
19.0.0.2.2 (2026-05-24)
- Changelog tracking starts at this release.
Discover the NextERP suite
Other modules from the same publisher, built to work together.
NextERP Romania
Odoo implementation, customization, Romanian localization and long-term support since 2018.
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