# yahiaqous/car-rental-system architecture

> Architecture diagram of the GitHub repository yahiaqous/car-rental-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yahiaqous/car-rental-system
- Repository: https://github.com/yahiaqous/car-rental-system

## Overview

This Odoo add-on supports an internal car-booking workflow: users browse available cars, reserve them, and request returns; managers can manage cars and reservations, handle return requests, and mark cars damaged. Reservation records track borrower, car, state, and return date, while user forms expose a borrower-specific reservation list. Core model and wizard behavior is excerpted; view and access-control responsibilities are represented from the README and manifest, but their implementation details were not sampled.

Main entry points: [`car_rental_system/models/car.py`](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car.py) (Car Records), [`car_rental_system/wizards/car_reserve_wizard.py`](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/wizards/car_reserve_wizard.py) (Reserve Wizard), [`car_rental_system/models/car_reservation.py`](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car_reservation.py) (Reservation Records), [`car_rental_system/views/car.xml`](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/car.xml) (Car Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Car Catalog"]
  node_cars["Car Records<br/>[car.py]"]
  node_car_views["Car Views<br/>[car.xml]"]
end

subgraph group_booking["Reservations"]
  node_reservation[("Reservation Records<br/>[car_reservation.py]")]
  node_reserve_wizard["Reserve Wizard"]
  node_wizard_view["Wizard View"]
  node_reservation_views["Reservation Views"]
  node_user_reservations["User Reservation List<br/>[user_form.py]"]
end

subgraph group_experience["Odoo Interface and Access"]
  node_user_views["User Form Views<br/>[user_form.xml]"]
  node_access["Groups and Access"]
end

node_user(("Normal User"))
node_manager(("Manager"))

node_user -->|"browses cars"| node_car_views
node_manager -->|"manages cars"| node_car_views
node_car_views -.->|"shows details"| node_cars
node_user -->|"reserves car"| node_cars
node_cars -->|"creates reservation"| node_reservation
node_cars -->|"opens for manager"| node_reserve_wizard
node_manager -->|"submits booking"| node_wizard_view
node_wizard_view -.->|"invokes wizard"| node_reserve_wizard
node_reserve_wizard -->|"creates reservation"| node_reservation
node_reserve_wizard -->|"marks rented"| node_cars
node_reservation -->|"unreserves car"| node_cars
node_user -->|"views history"| node_user_views
node_user_views -.->|"opens reservation list"| node_user_reservations
node_user_reservations -->|"counts and filters"| node_reservation
node_manager -->|"reviews history"| node_reservation_views
node_manager -->|"uses manager access"| node_access
node_user -->|"uses user access"| node_access

click node_cars "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car.py"
click node_car_views "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/car.xml"
click node_reservation "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car_reservation.py"
click node_reserve_wizard "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/wizards/car_reserve_wizard.py"
click node_wizard_view "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/wizards/car_reserve_wizard.xml"
click node_reservation_views "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/car_reservation.xml"
click node_user_reservations "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/user_form.py"
click node_user_views "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/user_form.xml"
click node_access "https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/security/ir.model.access.csv"

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_cars,node_car_views,node_user toneBlue
class node_reservation,node_reserve_wizard,node_wizard_view,node_reservation_views,node_user_reservations toneAmber
class node_user_views,node_access toneMint
class node_manager toneIndigo
```

## Components

### Car Catalog

- [Car Records](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car.py): `car_rental_system/models/car.py`
- [Car Views](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/car.xml): `car_rental_system/views/car.xml`

### Reservations

- [Reservation Records](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/car_reservation.py): `car_rental_system/models/car_reservation.py`
- [Reserve Wizard](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/wizards/car_reserve_wizard.py): `car_rental_system/wizards/car_reserve_wizard.py`
- [Wizard View](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/wizards/car_reserve_wizard.xml): `car_rental_system/wizards/car_reserve_wizard.xml`
- [Reservation Views](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/car_reservation.xml): `car_rental_system/views/car_reservation.xml`
- [User Reservation List](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/models/user_form.py): `car_rental_system/models/user_form.py`

### Odoo Interface and Access

- [User Form Views](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/views/user_form.xml): `car_rental_system/views/user_form.xml`
- [Groups and Access](https://github.com/yahiaqous/car-rental-system/blob/main/car_rental_system/security/ir.model.access.csv): `car_rental_system/security/ir.model.access.csv`

### Other components

- **Normal User**
- **Manager**

## Connections

- Normal User → Car Views: browses cars (evidence: `README.md`)
- Manager → Car Views: manages cars (evidence: `README.md`)
- Car Views → Car Records: shows details
- Normal User → Car Records: reserves car (evidence: `car_rental_system/models/car.py`)
- Car Records → Reservation Records: creates reservation (evidence: `car_rental_system/models/car.py`)
- Car Records → Reserve Wizard: opens for manager (evidence: `car_rental_system/models/car.py`)
- Manager → Wizard View: submits booking (evidence: `README.md`)
- Wizard View → Reserve Wizard: invokes wizard
- Reserve Wizard → Reservation Records: creates reservation (evidence: `car_rental_system/wizards/car_reserve_wizard.py`)
- Reserve Wizard → Car Records: marks rented (evidence: `car_rental_system/wizards/car_reserve_wizard.py`)
- Reservation Records → Car Records: unreserves car (evidence: `car_rental_system/models/car_reservation.py`)
- Normal User → User Form Views: views history (evidence: `README.md`)
- User Form Views → User Reservation List: opens reservation list
- User Reservation List → Reservation Records: counts and filters (evidence: `car_rental_system/models/user_form.py`)
- Manager → Reservation Views: reviews history (evidence: `README.md`)
- Manager → Groups and Access: uses manager access (evidence: `README.md`)
- Normal User → Groups and Access: uses user access (evidence: `README.md`)
