Odoo Community Association

Romania - Fiscal Validation

Mature License: AGPL-3 OCA/l10n-romania Translate me on Weblate Try me on Runboat

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

Table of contents

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

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

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

  • NextERP Romania
  • Forest and Biomass Romania

Contributors

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

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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:

feketemihai

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.