# aquih/fel_gt architecture

> Architecture diagram of the GitHub repository aquih/fel_gt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aquih/fel_gt
- Repository: https://github.com/aquih/fel_gt

## Overview

##### Project type and purpose
- This is an Odoo “addon” module named fel_gt, an extension to the Odoo ERP system that implements electronic invoicing (DTE) for Guatemala.
- Purpose: automatically generate a DTE (Documento Tributario Electrónico) XML from an Odoo invoice and integrate with an external FEL certificador service.

##### File structure
- Top-level files:
- `__manifest__.py`: Odoo manifest declaring module metadata and dependencies
- `__init__.py`: Python package initialization
- `README.md`, `LICENSE`
- `models/` directory: Python classes extending Odoo models:
- account, res_partner, res_company
- `views/` directory: XML view definitions for invoices, companies, partners, reports.
- No standalone frontend; everything plugs into Odoo’s web client.

##### README for additional insights
- Supports Odoo v13–16
- Defines extra fields on the Company form to hold FEL phrases and adenda code snippets (executed as Python)
- Requires an external “fel” certificador module to handle actual signing and submission.
- BSD-3 license; open for pull requests.

##### Detail
- Field-level triggers (e.g., on invoice validation event)
- Execution of Python code for FEL phrases/adenda in the Company extra tab
- Call out the dependency on the external “fel” certificador module

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Web Browser"]:::browser
    subgraph "Odoo ERP Platform"
        WebClient["Odoo Web Client"]:::odoo
        OdooCore["Odoo Core"]:::odoo
        subgraph "fel_gt Module"
            Manifest["__manifest__.py"]:::module
            Init["__init__.py"]:::module
            subgraph "Models"
                ModelsInit["__init__.py"]:::models
                Account["account.py"]:::models
                Company["res_company.py"]:::models
                Partner["res_partner.py"]:::models
            end
            subgraph "Views"
                InvoiceView["account_view.xml"]:::views
                PartnerView["partner_view.xml"]:::views
                CompanyView["res_company_view.xml"]:::views
                ReportView["report_invoice.xml"]:::views
            end
            DTE["DTE Generator Service"]:::service
        end
        Database["PostgreSQL Database"]:::db
    end
    External["External FEL Certificador Service"]:::external
    DocsSubgraph["Documentation & License"]:::docs
    README["README.md"]:::docs
    LICENSE["LICENSE"]:::docs

    Browser --> WebClient
    WebClient --> InvoiceView
    WebClient --> PartnerView
    WebClient --> CompanyView
    WebClient --> ReportView
    WebClient --> OdooCore
    OdooCore --> Account
    OdooCore --> Company
    OdooCore --> Partner
    Account --> Database
    Company --> Database
    Partner --> Database
    Account -->|generate DTE XML| DTE
    DTE --> Database
    DTE -->|POST XML| External
    External -->|return signed DTE| DTE
    DTE -->|attach signed DTE| OdooCore

    README --> DocsSubgraph
    LICENSE --> DocsSubgraph

    click Manifest "https://github.com/aquih/fel_gt/blob/13.0/__manifest__.py"
    click Init "https://github.com/aquih/fel_gt/blob/13.0/__init__.py"
    click ModelsInit "https://github.com/aquih/fel_gt/blob/13.0/models/__init__.py"
    click Account "https://github.com/aquih/fel_gt/blob/13.0/models/account.py"
    click Company "https://github.com/aquih/fel_gt/blob/13.0/models/res_company.py"
    click Partner "https://github.com/aquih/fel_gt/blob/13.0/models/res_partner.py"
    click InvoiceView "https://github.com/aquih/fel_gt/blob/13.0/views/account_view.xml"
    click PartnerView "https://github.com/aquih/fel_gt/blob/13.0/views/partner_view.xml"
    click CompanyView "https://github.com/aquih/fel_gt/blob/13.0/views/res_company_view.xml"
    click ReportView "https://github.com/aquih/fel_gt/blob/13.0/views/report_invoice.xml"
    click README "https://github.com/aquih/fel_gt/blob/13.0/README.md"
    click LICENSE "https://github.com/aquih/fel_gt/tree/13.0/LICENSE"

    classDef odoo fill:#cce5ff,stroke:#3366ff,color:#000;
    classDef module fill:#d4edda,stroke:#28a745,color:#000;
    classDef models fill:#d4edda,stroke:#28a745,color:#000;
    classDef views fill:#d4edda,stroke:#28a745,color:#000;
    classDef service fill:#d4edda,stroke:#28a745,color:#000;
    classDef db fill:#ececec,stroke:#666,color:#000;
    classDef external fill:#fff3cd,stroke:#ffcd3c,color:#000;
    classDef browser fill:#f0f0f0,stroke:#999,color:#000;
    classDef docs fill:#f8f9fa,stroke:#6c757d,color:#000;
```
