Bulgarian Company Registry Integration

l10n_bg_company_registry
REPOSITORY
REPOSITORYOCA/l10n-bulgaria
GIT
GIThttps://github.com/OCA/l10n-bulgaria.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-bulgaria/tree/18.0/l10n_bg_company_registry
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYLocalization
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Rosen Vladimirov
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Rosen Vladimirov
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, rosenvladimirov
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-bulgaria
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-bulgaria:
    - l10n_bg_config
    - l10n_bg_tariff_code
    - l10n_bg_city
odoo/odoo:
    - base
    - contacts
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_vat
    - l10n_bg
    - l10n_bg_ledger
    - stock_delivery
    - sale_stock
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - delivery
    - base_address_extended
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
# Bulgarian Company Registry Integration

This module provides real-time integration with the official Bulgarian Trade
Registry API (portal.registryagency.bg) to automatically fetch and populate
company data.

## Key Features
- Real-time API integration with portal.registryagency.bg
- Search companies by EIK (Bulgarian company identification number)
- Automatically populate partner data including:
  - Company name (Bulgarian)
  - Complete structured address (city, street, postal code, district)
  - Legal form (ООД, ЕООД, АД, ЕТ, etc.)
  - Registration date and court
  - Economic activity (NACE/NKID code and description)
  - Company managers and representatives
  - Contact information (email, phone)
- Smart address parsing supporting Bulgarian formats:
  - Streets (ул.) and boulevards (бул.)
  - Residential complexes (ж.к.)
  - Resort complexes (к.к.)
  - Localities (м.) and quarters (кв.)
  - With district information (р-н)
  - Email and phone extraction from addresses
- No offline database needed - always fresh data
- Works with l10n_bg_config module for EIK/UIC validation

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_bg_company_search_wizard_form bg.company.search.wizard.form bg.company.search.wizard form New
view_partner_form res.partner.property.form.l10n_bg res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (20)
  • company_data_json Text
    help='Raw company data from registry' readonly=True string='Company Data'
  • data_fetched Boolean
    default=False help='Indicates if data was successfully fetched'
  • display_activity_code Char
    readonly=True string='Activity Code'
  • display_activity_description Text
    readonly=True string='Activity Description'
  • display_address_bg Text
    readonly=True string='Address (BG)'
  • display_city_id Many2one → res.city
    readonly=True string='City' args: 'res.city'
  • display_country_id Many2one → res.country
    readonly=True args: 'res.country'
  • display_eik Char
    readonly=True string='UIC'
  • display_legal_form_bg Char
    readonly=True string='Legal Form (BG)'
  • display_name_bg Char
    readonly=True string='Company Name (BG)'
  • display_name_en Char
    readonly=True string='Company Name (EN)'
  • display_postal_code Char
    readonly=True string='Postal Code'
  • display_registration_date Date
    readonly=True string='Registration Date'
  • display_state_id Many2one → res.country.state
    readonly=True string='State' args: 'res.country.state'
  • display_street Char
    readonly=True string='Street'
  • display_vat Char
    readonly=True string='VAT Number'
  • eik Char
    help='Company EIK number (9 or 13 digits)' required=True string='EIK'
  • eik_changed Boolean
    compute='_compute_eik_changed' help='Indicates if EIK was changed by user' string='EIK Changed'
  • original_eik Char
    help='Original UIC from partner (to detect changes)' string='Original UIC'
  • partner_id Many2one → res.partner
    help='Partner to populate with company data' string='Partner' args: 'res.partner'
Public methods (3)
  • action_fetch_data(self)
    Fetch company data from a registry (manual refresh)
  • action_populate_partner(self)
    Populate partner with fetched company data
  • default_get(self, fields_list)
    @api.model
    Auto-fetch data when wizard opens if EIK is provided

New fields (5)
  • l10n_bg_activity_code Char
    help='Main economic activity code' string='Activity Code (NACE)'
  • l10n_bg_activity_description Text
    string='Activity Description'
  • l10n_bg_legal_form Char
    help='Bulgarian legal form (ООД, ЕООД, АД, etc.)' string='Legal Form (Bulgarian)'
  • l10n_bg_registration_court Char
    help='Court where company is registered' string='Registration Court'
  • l10n_bg_registration_date Date
    help='Date of company registration in Bulgarian Trade Register' string='Registration Date'
Public methods (1)
  • action_fetch_from_registry(self)
    Open wizard to fetch and populate company data from Bulgarian Company Registry