Skip to Content

Bulgarian Localization for Odoo 18: Configuration

Module l10n_bg_tax_adminfor Odoo 18 — fiscal positions, taxes, protocols, customs
April 1, 2026 by
Bulgarian Localization for Odoo 18: Configuration
BL Consulting Ltd, Boyan Yordanov

Bulgarian localization configuration

Module l10n_bg_tax_adminfor Odoo 18 — fiscal positions, taxes, protocols, customs

Contents

1. General architecture

The module manages tax document processing through three layers:

Level 1: Fiscal position

account.fiscal.position

Determines which tax to replace which . Auto-apply by country, group, priority.

Level 2: Tax Action Map

account.fiscal.position.tax.action

Determines what document to generate: protocol customs private standard

Level 3: Taxes

Distribution Lines

Determines how to post and which NRA cells to place in (through tags).

2. Fiscal positions

Priority hierarchy

SeqFiscal positionCountry / GroupWhen to apply
0OSS B2C (by country)Specific EU countryB2C sales in the EU with OSS registration
10Domestic🇧🇬 BulgariaTransactions with Bulgarian counterparties
20EU B2C🇪🇺 Europe groupSales to individuals in the EU (excluding OSS)
30EU B2B🇪🇺 Europe groupDeals with EU companies (B2B)
40Outside EU🌍 UnlimitedImport/export outside the EU
600% Art. 69(2)🇪🇺 Europe groupDeliveries to another EU country
610% Art. 82(2)🇪🇺 Europe groupServices received from the EU

Important: Sequence determines the priority. Lower value = higher priority. OSS (seq=0) is applied before EU B2B (seq=30).

EU B2B (seq=30) — GP

Sales (outgoing invoices)

Output taxReplaced withTag
20% VAT0% EU (WATER)+15
20% Personal use0% EU (WATER)+15
9% VAT0% EU (WATER)+15
9% Personal use0% EU (WATER)+15
0% Exempt0% EU (WATER)+15

Purchases (incoming invoices)

Output taxReplaced withType
20% OTC (without DK)20% EU PTC (ICA)group
20% FTC (full DC)20% EU PTC (ICA)group
20% PTC (partial DC)20% EU PTC (ICA)group

ICA (Intra-Community Acquisition): Group tax with two children — receivable and payable — which are self-cancelled through account 430000.

Outside EU (seq=40) — Input/Wear

Sales (export)

Output taxReplaced withTag
20% VAT0% EX (Export)+14
20% Personal use0% EX+14
9% VAT0% EX+14
0% Exempt0% EX+14

Purchases (imports)

Output taxReplaced withType
20% OTCCustoms Tariff + VATduty+VAT
20% FTCCustoms Tariff + VATduty+VAT
20% PTCCustoms Tariff + VATduty+VAT

Customs Tariff + VAT: Group tax with customs_ratechild (tariff duty) and percentchild (20% VAT on customs value).0% Art. 69(2) — Place outside Bulgaria

All sales taxes0% Under Art. 69(2)
It falls into box 23 of the reference-declaration (tag +23 )

0% Art. 82(2) — EU services received

All sales taxes0% PTC Art. 80(2)
Reverse charge with tag +12_2 → cl. 12

5. Tags → Cells from VAT return

Each tag ( account.account.tag) corresponds to a specific cell of the VAT Return (Art. 125, para. 1).

Section A — Tax Charged (Sales Journal)

TagCellDescription in the reference-declarationWhat falls
+11class 11VAT on taxable supplies at a rate of 20%Tax base of all sales with 20% VAT
+12_1class 12DO of VOP and supplies under Art. 82, para. 2-5Tax base of the general income tax (ICA)
+12_2class 12DO of VOP and supplies under Art. 82, para. 2-5EU services received under Art. 82(2)
+13class 13VAT on taxable supplies at a rate of 9%Sales with 9% VAT (tourism)
+14class 14DO of supplies under Art. 28, 140, 146 and Art. 173Exports, supplies of gold
+15class 15TO on the waterIntra-Community supplies (sales to EU companies)
+17class 17DO of services under Art. 21, para. 2Services with a recipient in another EU country (VIES)
+19class 19TO of exempt suppliesExempt supplies (Art. 38-50 VAT Act)
+21class 21Tax charged for supplies under cl. 11VAT 20% = cl.11 × 20%
+22class 22Tax charged for general business activities and supplies under class 12VAT reverse charge (GPL, Art. 82, Art. 84)
+23class 23Delivery schedule under Art. 69, para. 2Place of performance in another EU country
+24class 24Tax charged for supplies under cl. 13VAT 9% = cl.13 × 9%
+25class 25TO of trilateral transactions by an intermediaryTrilateral transactions under Article 15 of the VAT Act

Section B — Tax Credit (Purchase Journal)

TagCellDescription in the reference-declarationWhat falls
+30class 30TO of received deliveries without right to DCOver-the-counter (OTC) purchases
+31class 31TO of received deliveries with the right to full DCFull Tax Credit (FTC) Purchases
+32class 32TO of received deliveries with the right to partial DCPartial Tax Credit (PTC) Purchases
+33class 33Annual adjustment under Art. 73, para. 8Correction when changing coefficient
+41class 41VAT with the right to full VATCharged VAT = cl.31 × rate
+42class 42VAT with the right to partial tax creditCharged VAT = cl.32 × rate
+43class 43Annual adjustment under Art. 73, para. 8Correction of charged VAT

Result cells (automatically calculated)

CellDescriptionFormula
class 20Total tax chargedкл.21 + кл.22 + кл.24
class 40Total tax creditкл.41 + кл.42 + кл.43
class 50VAT for importкл.20 − кл.40(ako ≥ 0)
class 60VAT refundкл.40 − кл.20(if cl.40 > cl.20)
class 70Input tax — effectivelycl.50 (if there is no deduction)
class 80VAT for refund under Art. 92Accelerated recovery
class 81VAT for refund under Art. 92, para. 3Accumulated 2+ periods
class 82VAT for refund under Art. 92, para. 4Emergency recovery

+ = invoice, − = refund. Odoo 18: tax_negate. The rows in gray are not configured in the demo, but are part of the declaration.

9. Workflows

Stream 1: Intra-Community Acquisition (ICAA)

  1. Incoming invoice from EU supplier
  2. Automatically FP EU B2B
  3. Tax → 20% EU PTC (ICA)
  4. TAM:l10n_bg_move_type=protocol
  5. Publication → protocol (10-digit number)

Sales day:

cl.12.1 + cl.22Date of purchase:

class 31 + class 41Stream 2: Import from a third country

  1. Incoming invoice from outside the EU
  2. Automatically FP Outside EU
  3. Tax → Customs Tariff + VAT
  4. TAM:l10n_bg_move_type=customs
  5. Setl10n_bg_currency_rate
  6. Publication → customs declaration

Bribe = customs_base × tariff_rate

DDS = customs_base × 20%Stream 3: EU service (Art. 82(2))

  1. Incoming invoice from EU service provider
  2. FP 0% Art. 82(2)
  3. Tax → 0% PTC Art. 80(2)
  4. TAM:l10n_bg_move_type=protocol
  5. Posting → protocol

Sales day:

cl.12.2 + cl.22Date of purchase:

class 31 + class 41Stream 4: Personal use

  1. Incoming invoice for a personal use asset
  2. TAM:l10n_bg_move_type=private
  3. Tax: 20% Private Usage
  4. Set personal_km and total_km
  5. Coefficient = (personal / general) × 100
  6. Base = original × (coefficient / 100)
  7. Publish →account.move.bg.private

10. OSS (One Stop Shop)

OSS items automatically replace Bulgarian VAT rates with the rates of the recipient's country for B2C sales.

CountryCodeStandardReducedBG 20% →BG 9% →
🇩🇪 GermanyOF19%7%19% VAT7% DE VAT
🇫🇷 FranceFR20%5.5%20% FR VAT5.5% FR VAT
🇦🇹 AustriaAT20%10%20% AND VAT10% AND VAT
🇮🇹 ItalyIT22%4%22% IT VAT4% IT VAT
🇭🇺 HungaryHU27%5%27% HU VAT5% HU VAT
🇷🇴 RomaniaRO21%11%21% RO VAT11% RO VAT
🇬🇷 GreeceGR24%13%24% GR VAT13% GR VAT
🇵🇱 PolandPL23%8%23% PL VAT8% PL VAT
🇪🇸 SpainIS21%10%21% EU VAT10% EU VAT
🇳🇱 NetherlandsNL21%9%21% NL VAT9% NL VAT
🇧🇪 BelgiumBE21%6%21% VAT6% VAT
🇸🇪 SwedenSE25%6%25% SE VAT6% SE VAT
🇩🇰 DenmarkDK25%25%25% DK VAT25% DK VAT
🇫🇮 FinlandBE25.5%10%25.5% FI VAT10% FI VAT
🇸🇰 SlovakiaSK23%19%23% SK VAT19% UK VAT
🇨🇿 Czech RepublicCZ21%12%21% CZ VAT12% Czech VAT

OSS items also have seq=0a specific country → apply before EU B2B (seq=30). Tax group: OSS XX.X%, sequence 1000.

11. SQL Engine — l10n_bg_reports_audit

The module l10n_bg_reports_auditprovides a 6-layer SQL hierarchy of read-only view models ( _auto=False) for calculating VAT data.

Hierarchy of SQL models

LayerModelFunctionGROUP BY
1account.bg.calc.sales.lineExtracts tags from account_move_linesalesmove_id, date
1account.bg.calc.purchases.lineExtracts tags from account_move_linepurchasesmove_id, date
2account.bg.info.sale.lineFull information on document (sale)move_id + partner
2account.bg.info.purchases.lineFull information per document (purchase)move_id + partner
3account.bg.vat.result.declarCalculates cl. 50, 60, 70-82 (VAT for input/refund)move_id
4account.bg.vat.calc.declarCombines sales + purchases + resultcompany, period
5account.bg.vat.info.declarFinal declaration with company detailscompany, period
6account.bg.calc.vies.lineVIES lines by partner (tags 15, 17, 25)partner, period

Key SQL calculations

Tag extraction (Layer 1)

Each tag is extracted from account_account_tagusing CASE:

SUM(CASE
  WHEN am.state = 'cancel' THEN 0.00
  WHEN aat.tag_name = 11 AND NOT negate
    THEN aml.balance
  ELSE 0.00
END) * -1 AS account_tag_11

tag_name is parsed from the name:REGEXP_REPLACE(name#>>'{en_US}', '\D','','g')::numeric

Declaration formulas (Layer 4)

class 10Σ(11 + 12_1 + 12_2 + 13 + 14 + 15 + 16)
class 20Σ(21 + 22 + 23 + 24)
class 40Σ(41 + 42 × коеф.33 + 43)
class 50IF (кл.20 - кл.40) > 0 THEN ABS
class 60IF (кл.20 - кл.40) < 0 THEN ABS

cl.50/60 depend on l10n_bg_odoo_compatible: if True — calculated from SQL, if False — from declared values.

Info tags — document metadata

Sales log (info_tag_0-9)

info_tag_0Company ID (VAT / UIC)
info_tag_1Tax period (YYYYMM)
info_tag_2Branch code
info_tag_3Row number (ROW_NUMBER)
info_tag_4Document type (01, 02, 03...)
info_tag_5Document number
info_tag_6Document date
info_tag_7Recipient's VAT number
info_tag_8Recipient name (multilingual)
info_tag_9Description (narrative)

Purchase diary (info_tag_1-10)

info_tag_1Tax period (YYYYMM)
info_tag_2Company ID
info_tag_3Branch code
info_tag_4Serial number
info_tag_5Document type
info_tag_6Document number
info_tag_7Document date
info_tag_8Supplier VAT number
info_tag_9Supplier name
info_tag_10Delivery description

12. EE — l10n_bg_vat_reports (Enterprise)

Based on account_reportsa framework with custom handlers. Auto-install on l10n_bg+ account_reports.

Data flow

SQL Views

_table_query

_build_l10n_bg_query()

dictfetchall()

_create_report_line()

× N rows

WEB / PDF

CSV / ZIP

4 reports with handler classes

Declaration

Sections A/B/C/D

50+

Portrait PDF cells

Declaration.txt

Date of purchase

16 columns

80/page

Landscape PDF

Purchases.txt

Sales day

26 columns

80/page

Landscape PDF

Prodagbi.txt

WAYS

6 columns

By partner

Portrait PDF

Vies.txt

Export formats

FormatMethodCodingEncryptionDescription
WEBFrontend componentsInteractive view with drill-down to documents
PDF_export_to_pdf_base()QWeb → wkhtmltopdf, landscape for diaries
CSVget_l10n_bg_csv()CP1251Fixed width, NRA format
ZIPl10n_bg_export_csvs_zip()CP1251AES-256 (pyzipper)4 CSV files, no Zip64

CSV field formatting: parce_str_15() for text 15 characters, parce_fload_15_2()for amounts 15 characters with 2 decimals, parce_date_10()for date dd/mm/yyyy. Encoding CP1251 (Windows-1251) for compatibility with the National Revenue Agency.

13. CE — l10n_bg_report_vat (Community)

Wizard-based approach — does not depend on . account_reportsUses account_financial_report++ report_csv.report_zip

Flow: Wizard → Report → Export

Wizard

Date from/to

based_on

_print_report()

Format selection

_get_l10n_bg_results()

SQL views

PDF / CSV

ZIP / XLSX

Comparison of EE vs CE

AspectEE (l10n_bg_vat_reports)CE (l10n_bg_report_vat)
Frameworkaccount_reports + custom handlersWizard + account_financial_report
UI modelBuilt-in report viewer with toolbarModalen wizard → Print/Download
InteractivityLive filtering, drill-downManually running the wizard
Data accessHandler _get_dynamic_lines_data()Mixin_get_l10n_bg_results()
SQL viewsIdentical — both usel10n_bg_reports_audit
PDF exportQWeb → wkhtmltopdfQWeb → wkhtmltopdf
CSV exportget_l10n_bg_csv()report.report_csv.abstract
ZIP exportpyzipper AES-256report.report_zip.abstract + encryption
XLSXreport.report_xlsx.abstract(deactivated)
TabovSeparate report recordsBootstrap nav-tabs в QWeb
Dependenciesaccount_reports (EE-only)account_financial_report, report_csv, report_zip(FATHER)
PriceIncluded in EE license250 EUR (OPL-1)

CE Report Models (5th class)

BGVATQwebReport

Basic QWeb PDF/HTML report. Routes to 4 sub-templates via active_tabcontext.

  • declar → Portrait
  • sales → Landscape
  • purchase→ Landscape
  • vies→ Landscape

BgVat*Csv (4th grade)

report.report_csv.abstractThey also inherit l10n.bg.export.file.

  • BgVatDeclarationCsv→ Deklar.txt
  • BgVatSalesCsv → Prodagbi.txt
  • BgVatPurchaseCsv→ Pokupki.txt
  • BgVatViesCsv → Vies.txt

BgVatBookZip

Inherits report.report_zip.abstract. Generates a ZIP with 4 CSV files.

  • Callsget_l10n_bg_csv()
  • prepare_zip_payload()for encryption
  • Integration withl10n_bg_bank_wallet

Key: SQL view models are common for EE and CE. The only difference is in the presentation layer — EE uses account_reportsa framework, CE uses wizard + OCA report libraries.

Generated by module analysis l10n_bg_tax_admin, l10n_bg_reports_audit, l10n_bg_vat_reports, l10n_bg_report_vat— Odoo 18 Bulgarian localization

Share this post
Goods Receipt in Odoo — What Happens in Accounting
BL Consulting March 2026 8 min read Series: Real-Time Information