How ambientwave/odoo-dental-clinic-managment-system-with-rest-api works
Project type and purpose
• This is an Odoo module (“Odoo-Dental-Clinic-Management-System-With-REST-API”) that extends the Odoo ERP platform to manage dental-clinic workflows (patients, appointments, prescriptions) and provides a token-based REST API for authentication and appointment creation.
File structure
• __manifest__.py / __init__.py: module metadata and entry points.
• controllers/: REST controllers (login, common endpoints).
• models/: ORM classes (Patient, ClinicDoctor, PatientAppointment, AppointmentDentalProcedureLine, AppointmentAttachmentLine, PatientPrescription, AccessToken).
• views/: XML files customizing Odoo’s web UI (form views for patients, appointments, back-office dashboards).
• data/: initial data load (data.xml).
• security/: access control rules (ir.model.access.csv, security.xml).
• static/src/js, scss, xml: frontend assets for a custom ToothChart widget.
Extracted insights from README
• Core functionality: manage patients, appointments, prescriptions.
• Exposes login and appointment-creation endpoints via a REST API.
• Relies on Odoo’s MVC architecture plus a custom JS/SCSS widget.
• External Clients: Web browser (Odoo web UI) and API consumers (mobile app, external services).
• Odoo Server:
• Controllers layer (login.py, common.py) – REST API entry points.
• Models / ORM layer (all models/*.py) – business entities.
• View layer (views/*.xml + static assets) – UI definitions and JS widgets.
• Security layer (security/*.xml & CSV) – access rules and ACLs.
• PostgreSQL Database: persistent storage for all models.
• Static Asset Server: serves JS/SCSS/ToothChart widget.
b. Relationships & data flow
• UI Clients → HTTP → Odoo web server → View controllers → ORM → DB
• API Clients → HTTP/JSON → controllers/login.py → AccessToken model → ORM → DB
→ controllers/common.py → Appointment model → DB
• Odoo view XML definitions pull static assets (ToothChart.js + CSS) into browser.
c. Architectural patterns & principles
• MVC:
• Model = Odoo models/*.py mapped to DB tables
• View = XML and JS widget for dynamic charting
• Controller = Python code handling HTTP/JSON
• Token-based authentication for API (AccessToken model)
• Modular plugin for Odoo: encapsulation of functionality in a single add-on
d. Key technologies/frameworks
• Python 3 + Odoo framework
• PostgreSQL
• XML (Odoo views, data import)
• JavaScript/SCSS for custom ToothChart widget