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
---
- 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.
- 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.
- 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 fi RO12345678.
- 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".
auto_awesome What this module does
AI-generated from the code · Odoo 20.0When you type a Romanian VAT number on a company contact, Odoo fetches the company's official data from the ANAF tax authority website and fills in the name, address, registration number and VAT status automatically.
This module connects Odoo to the Romanian tax authority (ANAF) so that company contacts can be completed from official data instead of being typed by hand.
- On a Romanian company contact, changing the VAT number or the country triggers a lookup at ANAF. If the number is found, Odoo fills in the company name (in capitals), registration number, street, city, county, postal code, phone (only if empty) and CAEN activity code. The VAT number gets the RO prefix only when the company is registered for VAT.
- A new field "Romania - Old Name" lets you store a former company name; if ANAF still returns that old name, the contact is not overwritten.
- On the contact form, an ANAF information tab shows two read-only histories: the company's active/inactive registration state (with authorisation act, status text, start, end, publication and deletion dates) and its VAT-registration periods (start, end, cancellation date and message). New lines are added only when they differ from what is already stored.
- If ANAF cannot be reached or does not find the number, a warning message is shown instead of silently failing.
The module extends the contact screen (res.partner) and adds two history tables, l10n.ro.res.partner.anaf.status and l10n.ro.res.partner.anaf.scptva. The ANAF web address and an optional API key can be configured in system settings.
Depends on
Required by other modules
Models and fields (3)
- res.partner · extends an existing modell10n_ro_old_name (Romania - Old Name), l10n_ro_active_anaf_line_ids (Romania - Partner Active Anaf Status), l10n_ro_vat_subjected_anaf_line_ids (Romania - Anaf Company scpTVA Records)
- l10n.ro.res.partner.anaf.scptva · new modelmessage, end_date, year_date, partner_id, start_date, vat_number
- l10n.ro.res.partner.anaf.status · new modelact (Act autorizare), status (Partner Status), end_date, partner_id, start_date, vat_number, delete_date, publish_date, active_status
Text generated by AI (DeepSeek) from reading the Odoo 20.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 20.0
Confirmed on 2026-11-03 in branch 20.0 of OCA/l10n-romania.
terminal Installation and usage
OCA documentation · Odoo 20.0Installation
Source · Odoo 20.0To install this module, you need to:
- clone the branch 16.0 of the repository
- 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
Source · Odoo 20.0Put 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",
)No verified information in OCA: Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.