# oca/project architecture

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

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

## Overview

This repository is a collection of Odoo addons – a modular set of extensions to a standard Odoo environment – that primarily enhance and extend project management functionalities. The repository (OCA/project) gathers many independent yet related modules covering areas like project categorization, department grouping, key assignment, task management (adding notes, high/very high priority, description templates, stage management, etc.), timelines, timesheet control, purchase links, templates, and more. Essentially, the “system” is an Odoo backend server that, when installed with these addons, provides rich project management features.

##### Main components
- Odoo Core Platform: At the center is the Odoo core (the runtime engine) responsible for application lifecycle, ORM, web server, and security.
- Addons/Modules: Each directory (e.g., project_administrator_restricted_visibility, project_department, project_group, project_key, etc.) represents an add-on. These encapsulate business logic, data models, views, security, and translations.
- Subcomponents Within Each Addon: For every module, note elements such as:
– Models: Business logic and database objects (often in a “models” folder).
– Views: XML files that describe the user interface (found under “views”).
– Security: Access control lists and security rules (files like ir.model.access.csv, security XML, etc.).
– Hooks/Wizards: Custom functionality that is triggered on certain events (hooks.py, wizards folder), where applicable.
– Translations/Internationalization: i18n directories for localization.
– Tests: Unit tests for the module (items in “tests” folders).

##### Architectural Patterns and Design Principles
- Modularity: Emphasize that each add-on is a self-contained module with its own set of models, views, security rules, and supporting files. This speaks to the plugin architecture that Odoo uses.
- Extensibility: The use of manifest files and the Odoo framework shows an inherent extensibility where new functionality is added by simply installing the appropriate addon.

##### Relevant Technologies and Frameworks
- Python: All the server-side code is written in Python (observed in __init__.py files, controllers, and models).
- XML: Many UI views and configurations are defined using XML (found in the “views” directories).
- Odoo Framework: The overall system relies on Odoo’s ORM, web client, and MVC-like patterns.
- Testing/CI Configuration: Note the presence of workflows (GitHub actions) for tests, pre-commit hooks, linting tools (ESLint, PyLint, and others), and documentation files (README, CONTRIBUTORS, etc.) – they indicate commitment to quality and continuous integration.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Entities
    webClient["Web Client (User Interface)"]:::client
    odooCore["Odoo Core"]:::core
    webClient -->|"requests"| odooCore

    %% Odoo Addons Subgraph
    subgraph "Odoo Addons"
        pa["Project Administrator Restricted Visibility"]:::addon
        pd["Project Department"]:::addon
        pg["Project Group"]:::addon
        pght["Project Group HR Timesheet"]:::addon
        pk["Project Key"]:::addon
        pp["Project Parent"]:::addon
        pptf["Project Parent Task Filter"]:::addon
        ppl["Project Purchase Link"]:::addon
        pr["Project Role"]:::addon
        ps["Project Sequence"]:::addon
        ptavh["Project Task Add Very High"]:::addon
        ptds["Project Task Default Stage"]:::addon
        ptdt["Project Task Description Template"]:::addon
        ptn["Project Task Note"]:::addon
        ptpr["Project Task Pull Request"]:::addon
        ptsm["Project Task Stage Management"]:::addon
        ptss["Project Task Stage State"]:::addon
        pttag["Project Task Tag"]:::addon
        ptemp["Project Template"]:::addon
        ptl["Project Timeline"]:::addon
        pttl["Project Timeline HR Timesheet"]:::addon
        pttc["Project Timesheet Time Control"]:::addon
        ptype["Project Type"]:::addon
        sprc["Sale Project Reimbursement Cost"]:::addon
        sptr["Sale Project Task Recurrency"]:::addon
    end

    %% Registration Flows from Odoo Core to Addons
    odooCore -->|"register"| pa
    odooCore -->|"register"| pd
    odooCore -->|"register"| pg
    odooCore -->|"register"| pght
    odooCore -->|"register"| pk
    odooCore -->|"register"| pp
    odooCore -->|"register"| pptf
    odooCore -->|"register"| ppl
    odooCore -->|"register"| pr
    odooCore -->|"register"| ps
    odooCore -->|"register"| ptavh
    odooCore -->|"register"| ptds
    odooCore -->|"register"| ptdt
    odooCore -->|"register"| ptn
    odooCore -->|"register"| ptpr
    odooCore -->|"register"| ptsm
    odooCore -->|"register"| ptss
    odooCore -->|"register"| pttag
    odooCore -->|"register"| ptemp
    odooCore -->|"register"| ptl
    odooCore -->|"register"| pttl
    odooCore -->|"register"| pttc
    odooCore -->|"register"| ptype
    odooCore -->|"register"| sprc
    odooCore -->|"register"| sptr

    %% Extension Relationships
    pght -->|"extends"| pg
    pptf -->|"extends"| pp

    %% Simulated Data/Event Flow Examples
    odooCore -->|"update_priority"| ptavh
    odooCore -->|"add_note"| ptn

    %% Click Events
    click pa "https://github.com/oca/project/tree/17.0/project_administrator_restricted_visibility/"
    click pd "https://github.com/oca/project/tree/17.0/project_department/"
    click pg "https://github.com/oca/project/tree/17.0/project_group/"
    click pght "https://github.com/oca/project/tree/17.0/project_group_hr_timesheet/"
    click pk "https://github.com/oca/project/tree/17.0/project_key/"
    click pp "https://github.com/oca/project/tree/17.0/project_parent/"
    click pptf "https://github.com/oca/project/tree/17.0/project_parent_task_filter/"
    click ppl "https://github.com/oca/project/tree/17.0/project_purchase_link/"
    click pr "https://github.com/oca/project/tree/17.0/project_role/"
    click ps "https://github.com/oca/project/tree/17.0/project_sequence/"
    click ptavh "https://github.com/oca/project/tree/17.0/project_task_add_very_high/"
    click ptds "https://github.com/oca/project/tree/17.0/project_task_default_stage/"
    click ptdt "https://github.com/oca/project/tree/17.0/project_task_description_template/"
    click ptn "https://github.com/oca/project/tree/17.0/project_task_note/"
    click ptpr "https://github.com/oca/project/tree/17.0/project_task_pull_request/"
    click ptsm "https://github.com/oca/project/tree/17.0/project_task_stage_mgmt/"
    click ptss "https://github.com/oca/project/tree/17.0/project_task_stage_state/"
    click pttag "https://github.com/oca/project/tree/17.0/project_task_tag/"
    click ptemp "https://github.com/oca/project/tree/17.0/project_template/"
    click ptl "https://github.com/oca/project/tree/17.0/project_timeline/"
    click pttl "https://github.com/oca/project/tree/17.0/project_timeline_hr_timesheet/"
    click pttc "https://github.com/oca/project/tree/17.0/project_timesheet_time_control/"
    click ptype "https://github.com/oca/project/tree/17.0/project_type/"
    click sprc "https://github.com/oca/project/tree/17.0/sale_project_reimbursement_cost/"
    click sptr "https://github.com/oca/project/tree/17.0/sale_project_task_recurrency/"

    %% Styles
    classDef core fill:#f9c,stroke:#333,stroke-width:2px;
    classDef client fill:#cfc,stroke:#333,stroke-width:2px;
    classDef addon fill:#ccf,stroke:#333,stroke-width:2px;
```
