🇨🇿 The Challenge / 挑战 / Výzva

Implementing ERPNext in the Czech Republic, specifically for the public sector or organizations following Směrná účtová osnova, is painful. The official XML standards (uctosnova.xml) provided by the Ministry of Finance are not directly importable into ERPNext.

For a long time, accountants had to manually transcribe hundreds of account heads.
长期以来,捷克的会计师不得不手动转录数百个会计科目。
Dlouhou dobu museli účetní ručně přepisovat stovky účetních položek.


🛠️ The Solution / 解决方案 / Řešení

ERPNext-Czech-Uctova-Osnova-COA-Converter solves this by automating the conversion pipeline.

It takes the official government XML/CSV and generates a validated, hierarchical CSV ready for ERPNext’s “Chart of Accounts Importer”.
它接收官方的 XML/CSV 文件,并生成一个经过验证的、层级化的 CSV,可直接用于 ERPNext 的“会计科目表导入器”。
Přebírá oficiální vládní XML/CSV a generuje ověřené, hierarchické CSV připravené pro importér účtové osnovy v ERPNext.

🌟 Key Features / 核心特性

  • Auto-Detection: Smartly recognizes uctosnova.xml or CIS_POLVYK.CSV.
  • LLM Translation: Optional integration with OpenAI/Gemini/SiliconFlow to translate account names into English/Chinese while keeping the Czech roots.
  • Hierarchy Building: Automatically reconstructs the parent-child relationships (Group vs Ledger).

🚀 Usage / 使用指南

The project includes a compiled Docker container with a Drag & Drop UI.
最简单的使用方式是 Docker Web UI。

docker run --rm -p 8000:8000 yuanweize/erpnext-coa
# Open http://localhost:8000

2. CLI Mode (Power Providers)

For automated pipelines:

python erpnext_coa_translator.py --input uctosnova.xml --offline

3. ERPNext Import

  1. Go to Chart of Accounts Importer in ERPNext.
  2. Upload the generated erpnext_coa_multilingual_....csv.
  3. Select your Company and Root Type.
  4. Click Import.

🏗️ Architecture / 架构

graph LR
A[Official XML/CSV] --> B(Parser Engine)
B --> C{Translation Enabled?}
C -- Yes --> D[LLM Provider (OpenAI/Gemini)]
C -- No --> E[Direct Mapping]
D --> E
E --> F[Hierarchy Builder]
F --> G[ERPNext Validated CSV]

📦 Tech Stack

  • Backend: Python, FastAPI
  • Frontend: Vanilla JS (Single File Component)
  • AI: LangChain compatible interface