Metadata-Version: 2.1
Name: odoo-addon-l10n_ro_fiscal_validation
Version: 19.0.0.2.0
Requires-Dist: odoo-addon-l10n_ro_partner_create_by_vat==19.0.*
Requires-Dist: odoo-addon-l10n_ro_vat_on_payment==19.0.*
Requires-Dist: odoo==19.0.*
Summary: Romania - Fiscal Validation
Home-page: https://github.com/OCA/l10n-romania
License: AGPL-3
Author: NextERP Romania,Forest and Biomass Romania,Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 6 - Mature
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 - Fiscal Validation
===========================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
    :target: https://odoo-community.org/page/development-status
    :alt: Mature
.. |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/19.0/l10n_ro_fiscal_validation
    :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-19-0/l10n-romania-19-0-l10n_ro_fiscal_validation
    :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=19.0
    :alt: Try me on Runboat

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

This module allows you to bulk update partners (companies) datas from
ANAF webservice. It updates the name, address, vat subjected...

**Table of contents**

.. contents::
   :local:

Installation
============

To install this module, you need to:

- clone the branch 17.0 of the repository
  https://github.com/OCA/l10n-romania
- add the path to this repository in your configuration (addons-path)
- update the module list
- search for "Romania - Fiscal Validation" in your addons
- install the module

Usage
=====

A cron is set to update partners daily.

Configuration parameters
------------------------

The bulk ANAF sync (``res.partner.update_l10n_ro_vat_subjected``) reads
the following keys from ``ir.config_parameter``. All keys are optional —
sensible defaults are used when they are not set.

+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+
| Key                                                       | Default                                                               | Purpose                                        |
+===========================================================+=======================================================================+================================================+
| ``l10n_ro_fiscal_validation.anaf_bulk_url``               | ``https://webservicesp.anaf.ro/AsynchWebService/api/v/ws/tva``        | Endpoint that receives the asynchronous bulk   |
|                                                           |                                                                       | VAT-status request. Override only if ANAF      |
|                                                           |                                                                       | publishes a new URL or you want to route the   |
|                                                           |                                                                       | call through a proxy.                          |
+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+
| ``l10n_ro_fiscal_validation.anaf_corr``                   | ``https://webservicesp.anaf.ro/AsynchWebService/api/v8/ws/tva?id=%s`` | Endpoint polled for the result of the bulk     |
|                                                           |                                                                       | request. Must contain a single ``%s``          |
|                                                           |                                                                       | placeholder — the ``correlationId`` returned   |
|                                                           |                                                                       | by the bulk call is interpolated into it.      |
+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+
| ``l10n_ro_fiscal_validation.anaf_bulk_number``            | ``499``                                                               | Maximum number of VAT numbers sent per ANAF    |
|                                                           |                                                                       | call. Partners are split into chunks of this   |
|                                                           |                                                                       | size before each request. ANAF currently caps  |
|                                                           |                                                                       | a bulk request at 500 entries, so do not raise |
|                                                           |                                                                       | this above ``499``.                            |
+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+
| ``l10n_ro_partner_create_by_vat.anaf_api_key``            | *(empty)*                                                             | API key for ANAF endpoints that require        |
|                                                           |                                                                       | authentication. When empty, the request is     |
|                                                           |                                                                       | sent unauthenticated. The same key is shared   |
|                                                           |                                                                       | with the ``l10n_ro_partner_create_by_vat``     |
|                                                           |                                                                       | module, so set it once and both flows use it.  |
+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+
| ``l10n_ro_partner_create_by_vat.anaf_api_key_header_tag`` | ``x-api-key``                                                         | Name of the HTTP header that carries the API   |
|                                                           |                                                                       | key. Only meaningful when                      |
|                                                           |                                                                       | ``l10n_ro_partner_create_by_vat.anaf_api_key`` |
|                                                           |                                                                       | is set; change it if ANAF requires a different |
|                                                           |                                                                       | header name (e.g. ``Authorization``).          |
+-----------------------------------------------------------+-----------------------------------------------------------------------+------------------------------------------------+

Set these from **Settings → Technical → Parameters → System Parameters**
or via a data file / shell, e.g.:

.. code:: python

   self.env["ir.config_parameter"].sudo().set_param(
       "l10n_ro_fiscal_validation.anaf_bulk_number", "200",
   )

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_fiscal_validation%0Aversion:%2019.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
-------

* NextERP Romania
* Forest and Biomass Romania

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

- `NextERP Romania <https://www.nexterp.ro>`__:

  - Fekete Mihai <feketemihai@nexterp.ro>

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-feketemihai| image:: https://github.com/feketemihai.png?size=40px
    :target: https://github.com/feketemihai
    :alt: feketemihai

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

|maintainer-feketemihai| 

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

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