# odoo-mastercore/odoo-venezuela architecture

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

- Interactive diagram: https://gitdiagram.com/odoo-mastercore/odoo-venezuela
- Repository: https://github.com/odoo-mastercore/odoo-venezuela

## Overview

##### Project type and purpose
- This is not a standalone web app but a collection of Odoo “addons” (modules) implementing Venezuelan localization for accounting, invoicing, VAT ledgers, withholdings, and territorial data.
- Purpose: extend Odoo’s core ERP with country-specific data models (tax types, responsibility types, jurisdictions), views, wizards, reports (QWeb/PDF/XLSX) and security rules.

##### File structure
- Top‐level entries are one folder per module:
- territorial_pd
- l10n_ve_base
- l10n_ve_withholding
- l10n_ve_vat_ledger
- l10n_ve_invoice_reports
- plus two small partner‐VAT helper modules
- Each module follows Odoo’s standard layout:
- __manifest__.py (metadata, dependencies)
- models/  (Python ORM classes)
- data/    (XML or CSV seed data)
- views/   (XML UI definitions)
- wizards/ (transient models + wizard views)
- report/  (report definitions, templates, XLSX generators)
- security/ (access rules)
- No custom build scripts or external services are defined; all logic lives inside Odoo.

##### README
- Confirms the dependency graph: must install in order (territorial_pd → l10n_ve_base → l10n_ve_withholding → l10n_ve_vat_ledger).
- References core third-party modules required: account_payment_group, account_withholding, etc.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interface Layer"
        UI["Browser"]:::frontend
    end

    subgraph "Application Layer"
        core_HTTP["HTTP Server"]:::core
        core_ORM["ORM"]:::core
        core_Report["Report Engine"]:::core

        subgraph "Territorial Data Module"
            t_models["models/"]:::module
            t_data["data/"]:::module
            t_views["views/"]:::module
            t_security["security/"]:::module
        end

        subgraph "Base Localization Module"
            b_models["models/"]:::module
            b_data["data/"]:::module
            b_views["views/"]:::module
            b_wizard["wizards/"]:::module
            b_security["security/"]:::module
        end

        subgraph "Withholding Engine Module"
            w_models["models/"]:::module
            w_data["data/"]:::module
            w_views["views/"]:::module
            w_wizard["wizards/"]:::module
            w_reports["reports/"]:::module
            w_security["security/"]:::module
        end

        subgraph "VAT Ledger Module"
            v_models["models/"]:::module
            v_views["views/"]:::module
            v_wizard["wizards/"]:::module
            v_reports["reports/"]:::module
            v_security["security/"]:::module
        end

        subgraph "Invoice Reports Module"
            i_models["models/"]:::module
            i_data["data/"]:::module
            i_views["views/"]:::module
            i_templates["templates/"]:::module
        end

        subgraph "Partner-VAT Helpers"
            p1["unique_vat_by_partner/models/"]:::module
            p2["vat_type_partner/models/"]:::module
        end
    end

    subgraph "Data Layer"
        DB["PostgreSQL"]:::db
    end

    %% Flows
    UI -->|"HTTP Request"| core_HTTP
    core_HTTP -->|"Controller Calls"| core_ORM
    core_HTTP -->|"Report Request"| core_Report
    core_ORM -->|"Read/Write"| DB
    core_Report -->|"PDF/XLSX"| UI

    %% Module interactions with ORM
    t_models --> core_ORM
    b_models --> core_ORM
    w_models --> core_ORM
    v_models --> core_ORM
    i_models --> core_ORM
    p1 --> core_ORM
    p2 --> core_ORM

    %% Installation Order Dependencies
    t_models -.-> b_models
    b_models -.-> w_models
    w_models -.-> v_models

    %% Click Events
    click t_models "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/territorial_pd/models/models.py"
    click t_data "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/territorial_pd/data/"
    click t_views "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/territorial_pd/views/"
    click t_security "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/territorial_pd/security/ir.model.access.csv"

    click b_models "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_base/models/"
    click b_data "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_base/data/"
    click b_views "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_base/views/"
    click b_wizard "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_base/wizard/currency_rate_wizard.py"
    click b_security "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_base/security/ir.model.access.csv"

    click w_models "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_withholding/models/"
    click w_data "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_withholding/data/"
    click w_views "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_withholding/views/"
    click w_wizard "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_withholding/wizard/account_debit_note.py"
    click w_reports "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_withholding/reports/"
    click w_security "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_withholding/security/ir.model.access.csv"

    click v_models "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_vat_ledger/models/"
    click v_views "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_vat_ledger/views/account_vat_ledger_views.xml"
    click v_wizard "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_vat_ledger/wizard/wizard_resumen_iva.py"
    click v_reports "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_vat_ledger/report/account_vat_ledger_xlsx.py"
    click v_security "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_vat_ledger/security/ir.model.access.csv"

    click i_models "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_invoice_reports/models/account_move.py"
    click i_data "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_invoice_reports/data/external_layout_report.xml"
    click i_views "https://github.com/odoo-mastercore/odoo-venezuela/tree/15.0/l10n_ve_invoice_reports/views/"
    click i_templates "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/l10n_ve_invoice_reports/templates/report_invoice_ve.xml"

    click p1 "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/unique_vat_by_partner/models/res_partner.py"
    click p2 "https://github.com/odoo-mastercore/odoo-venezuela/blob/15.0/vat_type_partner/models/res_partner.py"

    %% Styles
    classDef frontend fill:#E0F7FA,stroke:#006064,color:#006064
    classDef core fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1
    classDef module fill:#C8E6C9,stroke:#2E7D32,color:#2E7D32
    classDef db fill:#FFF9C4,stroke:#F57F17,color:#F57F17
```
