Metadata-Version: 2.1
Name: odoo-addon-l10n_ro_message_spv
Version: 18.0.2.1.0
Requires-Python: >=3.10
Requires-Dist: odoo-addon-l10n_ro_config==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Romania - Mesaje SPV
Home-page: https://github.com/OCA/l10n-romania
License: AGPL-3
Author: Terrabit,Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 4 - Beta
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

====================
Romania - Mesaje SPV
====================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:96be661247425a302f814ffb22e53975b7386fd72fc0b435ce2ba26288b60efc
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--romania-lightgray.png?logo=github
    :target: https://github.com/OCA/l10n-romania/tree/18.0/l10n_ro_message_spv
    :alt: OCA/l10n-romania
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/l10n-romania-18-0/l10n-romania-18-0-l10n_ro_message_spv
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-romania&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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**

.. contents::
   :local:

Configuration
=============



Changelog
=========

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 <https://github.com/OCA/l10n-romania/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 <https://github.com/OCA/l10n-romania/issues/new?body=module:%20l10n_ro_message_spv%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Terrabit

Contributors
------------

- `Terrabit <https://www.terrabit.ro>`__:

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

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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.

.. |maintainer-dhongu| image:: https://github.com/dhongu.png?size=40px
    :target: https://github.com/dhongu
    :alt: dhongu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-dhongu| 

This module is part of the `OCA/l10n-romania <https://github.com/OCA/l10n-romania/tree/18.0/l10n_ro_message_spv>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
