OCA/l10n-romania · 19.0
Romania - Partner Create by VAT
l10n_ro_partner_create_by_vat
Romania - Partner Create by VAT
This module allows you to create the partners (companies) based on their VAT number. It will complete the name, address of the partner from ANAF webservice.
ANAF <https://webservicesp.anaf.ro/PlatitorTvaRest/api/v8/ws/tva>
1. CUI (Codul Unic de Înregistrare)
CUI-ul este "CNP-ul" unei firme. Este numărul atribuit de Registrul Comerțului (sau de Ministerul Finanțelor, după caz) în momentul în care o entitate juridică este înființată.
- Format: Este alcătuit dintr-un șir de cifre (între 2 și 10 cifre).
- Cine îl are: Toate entitățile juridice (SRL, PFA, ONG, etc.).
- Rol: Identifică în mod unic firma în fața autorităților și a partenerilor de afaceri.
2. CIF (Codul de Identificare Fiscală)
CIF-ul este, în esență, denumirea generică pentru codul de identificare al unui plătitor de taxe.
- Confuzia frecventă: Pentru o firmă (SRL), CUI și CIF sunt de cele mai multe ori același număr. Termenul "CIF" este folosit mai des de ANAF, în timp ce "CUI" este folosit de Registrul Comerțului.
- Cazuri speciale: Alte entități care nu sunt firme (de exemplu, asociațiile de proprietari sau instituțiile publice) primesc un CIF pentru a putea plăti taxe și impozite.
3. VAT ID (Codul de TVA)
VAT ID (sau codul de înregistrare în scopuri de TVA) reprezintă CUI-ul/CIF-ul firmei tale, dar cu prefixul de țară (pentru România, acesta este RO) atașat în față.
- Exemplu: Dacă CUI-ul firmei tale este
12345678, VAT ID-ul va fiRO12345678. - Importanță: Nu toate firmele au un VAT ID automat. O firmă are un
cod de TVA doar dacă:
- A depășit plafonul de scutire de TVA (300.000 lei cifră de afaceri).
- A ales să devină plătitoare de TVA prin opțiune.
- S-a înregistrat pentru operațiuni intracomunitare (achiziții/vânzări de servicii sau bunuri în UE).
Rezumat comparativ
| Termen | Ce înseamnă | Exemplu |
|---|---|---|
| CUI | Identificatorul oficial al firmei. | 12345678 |
| CIF | Termenul fiscal pentru CUI. | 12345678 |
| VAT ID | CUI-ul cu prefixul de țară (doar pentru firmele plătitoare de TVA). | RO12345678 |
Notă: Dacă o firmă nu este plătitoare de TVA, pe facturile emise de ea va apărea doar numărul simplu (CUI), fără prefixul "RO".
Table of contents
Installation
To install this module, you need to:
- clone the branch 16.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 - Partner Create by VAT" in your addons
- install the module
Usage
Put the VAT number in the partner's form and if it's a romanian company, it will fetch data available on ANAF website.
Configuration parameters
The ANAF lookup (res.partner._get_Anaf) 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_partner_create_by_vat.anaf_url | https://webservicesp.anaf.ro/api/PlatitorTvaRest/v9/tva | Endpoint queried for a single VAT number (or a small list). Override only if ANAF publishes a new URL or you want to route the call through a proxy. |
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 reused by the bulk sync in l10n_ro_fiscal_validation, 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_partner_create_by_vat.anaf_api_key", "your-key-here",
)
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
- NextERP Romania:
- Fekete Mihai <<feketemihai@nexterp.ro>>
- Dorin Hongu <<dhongu@gmail.com>>
- Adrian Vasile <<adrian.vasile@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>.






