Romania SAF-T D406 - ANAF Declaration XML for Odoo Community
by Modvanta https://modvantaapps.tech/odoo-apps/ro-saft-d406/$ 8.97

What it does
Generates the periodic D406 SAF-T declaration from your Odoo accounting: general ledger, sales invoices, purchase invoices and payments, for the declaration types L, T, NL and NT.
Each file is checked against the XSD published by ANAF. If you run ANAF's DUKIntegrator on your server, one button sends the file through it and stores the answer.
Who it is for
- Romanian companies on Odoo Community that file D406
- Accountants who prepare D406 for a company on Odoo
- Non-resident companies registered for VAT in Romania (NL, NT)
Key features
Passed ANAF's real validator on test data
The module was developed against DUKIntegrator version J2.2.15, the validator a real submission goes through. Our test files for L, T, NL and NT came back with no errors. Where the workbook, the XSD and the validator disagree, the file follows the validator.

DUKIntegrator result stored on the export
ANAF tax codes
The ANAF tax code list from the official workbook is included, 969 codes. Suggest Tax Codes fills only the plain domestic rates. Every other case is your accountant's choice, and a tax without a code stops the export.

ANAF SAF-T tax code on a tax
Storno accounting handled
Romanian charts post credit notes on the same side as the invoice with a negative amount. The file carries the indicator and signed amounts to match.
Partner codes in the ANAF format
Prefixes 00, 01, 02, 03, 04, 05 and 06 are built from country and VAT number. Lines that are not debts or receivables carry your own code, as ANAF requires.
Checks before the file
VAT number, address, contact name and phone, bank account, tax codes, numeric account numbers and draft entries.

Checks on a generated export
Account numbers
The account code is used as it is. If yours differs from the ANAF chart, set the ANAF number and the account nature on the account.

Chart of accounts
How it works
- Open Accounting, Romania SAF-T D406, and create an export with the type, year and month.
- Press Suggest Tax Codes and complete the other codes.
- Press Generate File, and Run DUKIntegrator if it is installed.
- Download the XML, sign it and upload it through SPV yourself.

History of what you generated, with the result of each run
What was tested, and what was not
| Tested | Automated tests on a clean database, with and without demo data, using the real Romanian chart and taxes: file content, partner codes, storno and non-storno credit notes, payments, non-resident layout, checks, record rules. |
| Checked with ANAF's tool | DUKIntegrator J2.2.15 reported no errors for test files of types L, T, NL and NT, covering domestic, EU and non-EU partners, individuals, foreign currency, credit notes, bank and cash payments and manual entries. |
| Not tested | A real submission through SPV. DUKIntegrator is not bundled, so it only runs where you install it. |
Not included
- Annual declaration A (assets) and on-request declaration C (stock).
- Payments on bank statements are reported from the journal entries, with one payment method per journal type.
- Corrective D406 and segmented files.
- Signing and submission.
Settings
- DUKIntegrator: install ANAF's kit on the server and set the system parameter mdv_ro_saft_d406.duk_path to its dist folder. Java is required.
- ANAF tax code: on each tax.
- ANAF account number and nature: on each account, when needed.
- NC code: on the product, where the law requires it.
FAQ
Is DUKIntegrator included?
No. It is ANAF's tool, and you download it from ANAF. The module works without it, and then only the XSD check runs.
Does it submit the declaration?
No. It does not sign or submit. You upload through SPV.
Does ANAF accept the file?
It passed DUKIntegrator on our test data. Your own data can raise other points, so run the validator on every real file. It was not filed at ANAF by us.
What about the annual assets file and the stock file?
The annual A and on-request C declarations are not included.
Compatibility
Odoo 19 Community and Enterprise. It uses the standard Accounting / Invoicing data and needs no Enterprise app.
Support
Questions or a problem with a file? Write to modvantaapps@gmail.com.
Buy Now - $9
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 864 |
| Technical Name |
mdv_ro_saft_d406 |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/ro-saft-d406/ |
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