Romania - Mesaje SPV
by Terrabit https://github.com/OCA/l10n-romania , Odoo Community Association (OCA) https://github.com/OCA/l10n-romaniaRomania - Mesaje SPV

Acest modul facilitează gestionarea mesajelor din Spațiul Privat Virtual (SPV) ANAF, asigurând descărcarea și procesarea automată a facturilor electronice (e-Factura):
- Funcționalități:
- Descărcare automată mesaje SPV: sincronizare periodică (via cron) a listei de mesaje din SPV pentru facturi primite, trimise sau erori.
- Procesare fișiere ZIP: descărcarea automată a arhivelor ZIP de la ANAF și extragerea fișierelor XML semnate.
- Creare automată facturi de furnizor: generează schițe de factură (draft) direct din fișierele XML descărcate, mapând automat furnizorul pe baza codului fiscal (CIF).
- Gestionare PDF-uri e-Factura:
- Generare PDF ANAF: posibilitatea de a genera și descărca vizualizarea PDF oficială a XML-ului folosind serviciile ANAF.
- Extragere PDF încorporat: extrage PDF-urile atașate direct în fișierul XML (dacă există).
- Monitorizare stări: urmărirea stării fiecărui mesaj (Draft, Downloaded, Invoice, Error, Done) și a încercărilor de descărcare.
- Integrare cu fluxul de facturare: legarea automată a mesajelor de facturile existente în sistem pe baza ID-ului de tranzacție sau a referinței.
- Sincronizarea datelor produselor: permite salvarea automată a codurilor de furnizor pentru produse la validarea facturilor primite.
Table of contents
Changelog
18.0.2.1.1 (2026-07-05)
- Clicking “Download embedded PDF” when the invoice XML has no embedded PDF now raises a user-friendly error instead of navigating to a raw 404 page.
- The form view no longer shows the derived attachment fields (ZIP, XML, ANAF PDF, embedded PDF) with their file names, since those are only materialized on demand and often have no name to display. The four download actions are now buttons with suggestive icons in the form header instead.
18.0.2.0.0 (2026-07-02)
Storage optimization: the signed ANAF ZIP is now the only file stored per SPV message.
- The XML extracted from the ZIP is no longer stored as a separate attachment at download time; the message metadata (reference, amount, invoice date, currency) is parsed in memory.
- attachment_xml_id, attachment_anaf_pdf_id and attachment_embedded_pdf_id became non-stored computed fields that expose the files materialized on the linked invoice.
- The XML is created once, directly on the vendor bill, when the invoice is created from the message; the PDF embedded in the XML is attached once on the bill as its preview (main attachment).
- The ANAF PDF and the embedded PDF are no longer persisted per message: the download buttons stream them on the fly, derived from the ZIP, via the new /l10n_ro/message_spv/<id>/{xml,anaf_pdf,embedded_pdf} routes.
- Migration: derived attachments of messages linked to an invoice are relinked to the invoice; those of messages without an invoice are deleted (they can be re-extracted from the ZIP), reclaiming the duplicated filestore space.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Terrabit
Contributors
- Terrabit:
- Dorin Hongu <dhongu@gmail.com>
Do not contact contributors directly about support or help with technical issues.
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:

This module is part of the OCA/l10n-romania project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Please log in to comment on this module