# oca/account-closing architecture

> Architecture diagram of the GitHub repository oca/account-closing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oca/account-closing
- Repository: https://github.com/oca/account-closing

## Overview

This repository contains two Odoo accounting addons. Fiscal year closing lets an accounting user configure or select a closing template, calculate closing and opening journal entries, inspect an unbalanced entry when calculation fails, and post or recalculate the result. The separate invoice-date addon adds product-driven start/end date requirements to invoice lines and exposes those dates in invoice reporting. The graph follows relationships visible in the sampled source; template and report details are documented by their modules, but no extra runtime links are inferred where source evidence is absent.

Main entry points: [`account_fiscal_year_closing/models/account_fiscalyear_closing.py`](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing.py) (Closing Workflow), [`account_invoice_start_end_dates/models/account_move_line.py`](https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/account_move_line.py) (Invoice Line Dates), [`account_fiscal_year_closing/models/account_fiscalyear_closing_template.py`](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing_template.py) (Closing Templates), [`account_invoice_start_end_dates/models/product_template.py`](https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/product_template.py) (Date Requirements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fiscal["Fiscal Closing"]
  node_closing["Closing Workflow"]
  node_abstract["Closing Definitions"]
  node_templates["Closing Templates"]
  node_unbalanced["Unbalanced Entry"]
end

subgraph group_dates["Invoice Dates"]
  node_products["Date Requirements"]
  node_invoice_lines["Invoice Line Dates"]
  node_invoice_report["Invoice Reporting"]
end

subgraph group_accounting["Accounting Models"]
  node_moves["Journal Entries<br/>[account_move.py]"]
end

node_accountant(("Accounting User"))

node_accountant -->|"runs closing"| node_closing
node_templates -->|"configures"| node_closing
node_closing -->|"creates entries"| node_moves
node_closing -->|"opens diagnostic"| node_unbalanced
node_products -->|"requires dates"| node_invoice_lines
node_invoice_lines -->|"supplies dates"| node_invoice_report

click node_closing "https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing.py"
click node_abstract "https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py"
click node_templates "https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing_template.py"
click node_unbalanced "https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/wizards/account_fiscal_year_closing_unbalanced_move.py"
click node_moves "https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_move.py"
click node_products "https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/product_template.py"
click node_invoice_lines "https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/account_move_line.py"
click node_invoice_report "https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/reports/account_invoice_report.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_closing,node_abstract,node_templates,node_unbalanced,node_accountant toneBlue
class node_products,node_invoice_lines,node_invoice_report toneAmber
class node_moves toneMint
```

## Components

### Fiscal Closing

- [Closing Workflow](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing.py): `account_fiscal_year_closing/models/account_fiscalyear_closing.py`
- [Closing Definitions](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py): `account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py`
- [Closing Templates](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_fiscalyear_closing_template.py): `account_fiscal_year_closing/models/account_fiscalyear_closing_template.py`
- [Unbalanced Entry](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/wizards/account_fiscal_year_closing_unbalanced_move.py): `account_fiscal_year_closing/wizards/account_fiscal_year_closing_unbalanced_move.py`

### Invoice Dates

- [Date Requirements](https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/product_template.py): `account_invoice_start_end_dates/models/product_template.py`
- [Invoice Line Dates](https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/models/account_move_line.py): `account_invoice_start_end_dates/models/account_move_line.py`
- [Invoice Reporting](https://github.com/oca/account-closing/blob/19.0/account_invoice_start_end_dates/reports/account_invoice_report.py): `account_invoice_start_end_dates/reports/account_invoice_report.py`

### Accounting Models

- [Journal Entries](https://github.com/oca/account-closing/blob/19.0/account_fiscal_year_closing/models/account_move.py): `account_fiscal_year_closing/models/account_move.py`

### Other components

- **Accounting User**

## Connections

- Accounting User → Closing Workflow: runs closing (evidence: `README.md`)
- Closing Templates → Closing Workflow: configures (evidence: `account_fiscal_year_closing/models/account_fiscalyear_closing.py`)
- Closing Workflow → Journal Entries: creates entries (evidence: `account_fiscal_year_closing/models/account_fiscalyear_closing.py`)
- Closing Workflow → Unbalanced Entry: opens diagnostic (evidence: `account_fiscal_year_closing/models/account_fiscalyear_closing.py`)
- Date Requirements → Invoice Line Dates: requires dates (evidence: `account_invoice_start_end_dates/models/account_move_line.py`)
- Invoice Line Dates → Invoice Reporting: supplies dates (evidence: `account_invoice_start_end_dates/reports/account_invoice_report.py`)
