# hanineou/odoo18-custom-modules architecture

> Architecture diagram of the GitHub repository hanineou/odoo18-custom-modules, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hanineou/odoo18-custom-modules
- Repository: https://github.com/hanineou/odoo18-custom-modules

## Overview

This repository is a collection of Odoo addons for HR operations: payroll, attendance capture and synchronization, absence-risk analytics, and a responsive web client. Users manage payroll and attendance in Odoo; biometric and BioTime integrations transfer related records, while prediction models produce employee-level absence-risk records and alerts. The graph keeps these as distinct capabilities rather than implying one end-to-end pipeline. Sampled source supports the noted calls; other subsystem boundaries and capabilities are inferred from the file tree, since the README is empty and most modules were not sampled.

Main entry points: [`zk_biotime_sync/models/hr_employee.py`](https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/hr_employee.py) (Employee sync), [`payroll/models/hr_payslip.py`](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip.py) (Payslips), [`web_responsive/static/src/components/menu_searchbar/searchbar.esm.js`](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_searchbar/searchbar.esm.js) (Apps menu search), [`assas_biotime_sync/models/emp_clean.py`](https://github.com/hanineou/odoo18-custom-modules/blob/main/assas_biotime_sync/models/emp_clean.py) (Employee reconciliation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_payroll["Payroll"]
  node_payslips["Payslips<br/>[hr_payslip.py]"]
  node_contracts["Contracts<br/>[hr_contract.py]"]
  node_salary_rules["Salary rules<br/>[hr_salary_rule.py]"]
  node_payslip_lines["Payslip lines<br/>[hr_payslip_line.py]"]
  node_payroll_runs["Payslip batches<br/>[hr_payslip_run.py]"]
end

subgraph group_attendance["Attendance"]
  node_attendance_records[("Attendance records<br/>[hr_attendance.py]")]
  node_attendance_tools["Attendance tools"]
  node_biometric["Biometric device"]
  node_zk_records[("Device punches")]
end

subgraph group_biotime["BioTime Sync"]
  node_biotime_config["BioTime config<br/>[zk_config.py]"]
  node_employee_sync["Employee sync<br/>[hr_employee.py]"]
  node_sync_log[("Sync log<br/>[zk_sync_log.py]")]
  node_biotime_employee_import["Employee reconciliation<br/>[emp_clean.py]"]
end

subgraph group_analytics["Absence Analytics"]
  node_absence_prediction[("Absence prediction")]
  node_employee_profile[("Employee profile")]
  node_punctuality[("Punctuality score")]
  node_anomaly_alerts[("Pattern alerts<br/>[pattern_alert.py]")]
  node_overtime_anomaly[("Overtime anomalies")]
end

subgraph group_web["Responsive Client"]
  node_responsive_ui["Responsive UI"]
  node_apps_search["Apps menu search<br/>[searchbar.esm.js]"]
  node_canonical_search["Canonical search<br/>[searchbar.esm.js]"]
  node_odoo_search["Odoo search<br/>[searchbar.esm.js]"]
  node_fuse_search["Fuse search<br/>[searchbar.esm.js]"]
  node_command_palette["Command palette<br/>[main.esm.js]"]
end

node_hr_user(("HR user"))
node_biotime_api{{"BioTime service"}}
node_external_odoo{{"Odoo web client"}}

node_hr_user -->|"manages"| node_payslips
node_payslips -->|"resolves"| node_contracts
node_payslips -->|"evaluates"| node_salary_rules
node_payslips -->|"computes"| node_payslip_lines
node_hr_user -->|"batches"| node_payroll_runs
node_hr_user -->|"requests reports"| node_attendance_tools
node_biometric -->|"imports punches"| node_zk_records
node_zk_records -->|"creates attendance"| node_attendance_records
node_hr_user -->|"manages device"| node_biometric
node_employee_sync -->|"uses API config"| node_biotime_config
node_employee_sync -->|"syncs employees"| node_biotime_api
node_employee_sync -->|"logs results"| node_sync_log
node_employee_sync -->|"pre-syncs related records"| node_biotime_api
node_biotime_employee_import -->|"fetches and updates"| node_biotime_api
node_biotime_employee_import -->|"reads employees"| node_external_odoo
node_hr_user -->|"runs predictions"| node_absence_prediction
node_absence_prediction -->|"associates employee"| node_employee_profile
node_hr_user -->|"reviews scores"| node_punctuality
node_hr_user -->|"reviews alerts"| node_anomaly_alerts
node_hr_user -->|"reviews anomalies"| node_overtime_anomaly
node_external_odoo -->|"hosts"| node_responsive_ui
node_responsive_ui -->|"provides menu"| node_apps_search
node_apps_search -->|"selects search mode"| node_canonical_search
node_apps_search -->|"selects search mode"| node_odoo_search
node_apps_search -->|"selects search mode"| node_fuse_search
node_odoo_search -->|"opens palette"| node_command_palette
node_canonical_search -->|"searches menu tree"| node_external_odoo

click node_payslips "https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip.py"
click node_contracts "https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_contract.py"
click node_salary_rules "https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_salary_rule.py"
click node_payslip_lines "https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip_line.py"
click node_payroll_runs "https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip_run.py"
click node_attendance_records "https://github.com/hanineou/odoo18-custom-modules/blob/main/module1/models/hr_attendance.py"
click node_attendance_tools "https://github.com/hanineou/odoo18-custom-modules/blob/main/module1/models/attendance_report_wizard.py"
click node_biometric "https://github.com/hanineou/odoo18-custom-modules/blob/main/hr_zk_attendance_oca/models/biometric_device_details.py"
click node_zk_records "https://github.com/hanineou/odoo18-custom-modules/blob/main/hr_zk_attendance_oca/models/zk_machine_attendance.py"
click node_biotime_config "https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/zk_config.py"
click node_employee_sync "https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/hr_employee.py"
click node_sync_log "https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/zk_sync_log.py"
click node_biotime_employee_import "https://github.com/hanineou/odoo18-custom-modules/blob/main/assas_biotime_sync/models/emp_clean.py"
click node_absence_prediction "https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/absence_prediction.py"
click node_employee_profile "https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/employee_profile.py"
click node_punctuality "https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/punctuality_score.py"
click node_anomaly_alerts "https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/pattern_alert.py"
click node_overtime_anomaly "https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/overtime_anomaly.py"
click node_responsive_ui "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/legacy/js/web_responsive.esm.js"
click node_apps_search "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_searchbar/searchbar.esm.js"
click node_canonical_search "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js"
click node_odoo_search "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_odoo_searchbar/searchbar.esm.js"
click node_fuse_search "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_fuse_searchbar/searchbar.esm.js"
click node_command_palette "https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/command_palette/main.esm.js"

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_payslips,node_contracts,node_salary_rules,node_payslip_lines,node_payroll_runs,node_hr_user,node_external_odoo toneBlue
class node_attendance_records,node_attendance_tools,node_biometric,node_zk_records toneAmber
class node_biotime_config,node_employee_sync,node_sync_log,node_biotime_employee_import toneMint
class node_absence_prediction,node_employee_profile,node_punctuality,node_anomaly_alerts,node_overtime_anomaly toneRose
class node_responsive_ui,node_apps_search,node_canonical_search,node_odoo_search,node_fuse_search,node_command_palette,node_biotime_api toneIndigo
```

## Components

### Payroll

- [Payslips](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip.py): `payroll/models/hr_payslip.py`
- [Contracts](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_contract.py): `payroll/models/hr_contract.py`
- [Salary rules](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_salary_rule.py): `payroll/models/hr_salary_rule.py`
- [Payslip lines](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip_line.py): `payroll/models/hr_payslip_line.py`
- [Payslip batches](https://github.com/hanineou/odoo18-custom-modules/blob/main/payroll/models/hr_payslip_run.py): `payroll/models/hr_payslip_run.py`

### Attendance

- [Attendance records](https://github.com/hanineou/odoo18-custom-modules/blob/main/module1/models/hr_attendance.py): `module1/models/hr_attendance.py`
- [Attendance tools](https://github.com/hanineou/odoo18-custom-modules/blob/main/module1/models/attendance_report_wizard.py): `module1/models/attendance_report_wizard.py`
- [Biometric device](https://github.com/hanineou/odoo18-custom-modules/blob/main/hr_zk_attendance_oca/models/biometric_device_details.py): `hr_zk_attendance_oca/models/biometric_device_details.py`
- [Device punches](https://github.com/hanineou/odoo18-custom-modules/blob/main/hr_zk_attendance_oca/models/zk_machine_attendance.py): `hr_zk_attendance_oca/models/zk_machine_attendance.py`

### BioTime Sync

- [BioTime config](https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/zk_config.py): `zk_biotime_sync/models/zk_config.py`
- [Employee sync](https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/hr_employee.py): `zk_biotime_sync/models/hr_employee.py`
- [Sync log](https://github.com/hanineou/odoo18-custom-modules/blob/main/zk_biotime_sync/models/zk_sync_log.py): `zk_biotime_sync/models/zk_sync_log.py`
- [Employee reconciliation](https://github.com/hanineou/odoo18-custom-modules/blob/main/assas_biotime_sync/models/emp_clean.py): `assas_biotime_sync/models/emp_clean.py`

### Absence Analytics

- [Absence prediction](https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/absence_prediction.py): `ai_absenteeism_dashboard/models/absence_prediction.py`
- [Employee profile](https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/employee_profile.py): `ai_absenteeism_dashboard/models/employee_profile.py`
- [Punctuality score](https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/punctuality_score.py): `ai_absenteeism_dashboard/models/punctuality_score.py`
- [Pattern alerts](https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/pattern_alert.py): `ai_absenteeism_dashboard/models/pattern_alert.py`
- [Overtime anomalies](https://github.com/hanineou/odoo18-custom-modules/blob/main/ai_absenteeism_dashboard/models/overtime_anomaly.py): `ai_absenteeism_dashboard/models/overtime_anomaly.py`

### Responsive Client

- [Responsive UI](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/legacy/js/web_responsive.esm.js): `web_responsive/static/src/legacy/js/web_responsive.esm.js`
- [Apps menu search](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_searchbar/searchbar.esm.js): `web_responsive/static/src/components/menu_searchbar/searchbar.esm.js`
- [Canonical search](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js): `web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js`
- [Odoo search](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_odoo_searchbar/searchbar.esm.js): `web_responsive/static/src/components/menu_odoo_searchbar/searchbar.esm.js`
- [Fuse search](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/menu_fuse_searchbar/searchbar.esm.js): `web_responsive/static/src/components/menu_fuse_searchbar/searchbar.esm.js`
- [Command palette](https://github.com/hanineou/odoo18-custom-modules/blob/main/web_responsive/static/src/components/command_palette/main.esm.js): `web_responsive/static/src/components/command_palette/main.esm.js`

### Other components

- **HR user**
- **BioTime service**
- **Odoo web client**

## Connections

- HR user → Payslips: manages
- Payslips → Contracts: resolves
- Payslips → Salary rules: evaluates
- Payslips → Payslip lines: computes
- HR user → Payslip batches: batches
- HR user → Attendance tools: requests reports
- Biometric device → Device punches: imports punches
- Device punches → Attendance records: creates attendance
- HR user → Biometric device: manages device
- Employee sync → BioTime config: uses API config
- Employee sync → BioTime service: syncs employees
- Employee sync → Sync log: logs results
- Employee sync → BioTime service: pre-syncs related records
- Employee reconciliation → BioTime service: fetches and updates
- Employee reconciliation → Odoo web client: reads employees
- HR user → Absence prediction: runs predictions
- Absence prediction → Employee profile: associates employee
- HR user → Punctuality score: reviews scores
- HR user → Pattern alerts: reviews alerts
- HR user → Overtime anomalies: reviews anomalies
- Odoo web client → Responsive UI: hosts
- Responsive UI → Apps menu search: provides menu
- Apps menu search → Canonical search: selects search mode
- Apps menu search → Odoo search: selects search mode
- Apps menu search → Fuse search: selects search mode
- Odoo search → Command palette: opens palette
- Canonical search → Odoo web client: searches menu tree
