How bharathi17656/megacream-staging works
Purpose and Runtime
This repository is a suite of installable Odoo add-ons for HR/attendance/payroll and business-document customization (accounting, sales, purchasing, inventory). Each module is entered through its Odoo manifest and Python package initialization, for example advance_attendance/__manifest__.py and adevx_hr_leave_rule/__init__.py. Runtime is the Odoo server, using its ORM, model inheritance, XML views/reports, access-control records, wizards, scheduled actions, and mail activities.
HR Attendance and Leave Policy
The core HR customization layer extends Odoo attendance, employee, leave, work-schedule, and payslip models. adevx_hr_leave_rule/models/hr_leave_rule.py defines leave-rule behavior; related extensions span adevx_hr_leave_rule/models/hr_leave_inherit.py and adevx_hr_leave_rule/models/hr_payslip.py. UI and policy configuration are exposed through adevx_hr_leave_rule/views/hr_leave_rule.xml and adevx_hr_leave_rule/views/hr_leave_type.xml.
Advanced Attendance Workflow
advance_attendance supplies the operational attendance workflow: configurable approvals, auto-allocation, late-entry handling, schedules, and leave automation. Primary control flow is attendance/leave events → approval or allocation rules → approval requests and HR record updates. Key boundaries are configuration (advance_attendance/models/approval_config.py, advance_attendance/models/auto_allocation_config.py), workflow records (advance_attendance/models/approval_request.py), and the user-driven activity wizard (advance_attendance/wizard/attendance_activity_wizard.py). Scheduled/background execution is configured in advance_attendance/data/cron.xml; notification integration uses advance_attendance/data/email_templates.xml.
Biometric Ingestion and Attendance Reporting
The biometric connector isolates integration with BioTime terminals/services from Odoo HR attendance records. Service and terminal configuration live in l4e_biotime_connector/models/biotime_service.py and l4e_biotime_connector/models/biotime_terminal.py; raw or intermediate attendance-line handling is represented by l4e_biotime_connector/models/hr_attendance_line.py, feeding attendance extensions in l4e_biotime_connector/models/hr_attendance.py. Reporting is a separate boundary: attendance filters/wizards generate daily and monthly outputs through attendance_status_filter/models/attendance_report_wizard.py, attendance_status_filter/models/monthly_attendance_wizard.py, and XML templates such as attendance_status_filter/reports/monthly_attendance_template.xml.
Payroll and Employee Compensation Outputs
Payroll behavior is modified by leave/worked-day rules and statutory controls, while reporting is delivered through Odoo reports and a custom controller. Relevant extensions include adevx_hr_leave_rule/models/hr_payslip_worked_days.py, payroll_pf_esi_control/models/hr_payslip.py, and employee_salary_report/models/hr_payslip_inherit.py. Payment reporting has a request/controller boundary at payroll_payment_report/controllers/payment_report_controller.py, with wizard-driven parameter collection in payroll_payment_report/wizard/payment_report_wizard.py and rendering in payroll_payment_report/report/payment_report_template.xml.
Commercial Document Extensions
Accounting, sales, purchasing, and stock are extended independently through Odoo model inheritance and views. Invoice customization/reporting centers on l4e_invoice_report/models/account_move.py and l4e_invoice_report/report/invoice_report_template.xml; posted invoices can be edited via l4e_posted_invoice_editor/models/account_move.py. Sales/purchase charges use wizard-mediated flows in l4e_transportation_charge/models/sale_order.py and l4e_transportation_charge/wizard/transportation_charge_wizard.py, while draft purchase approval extends orders and users in purchase_draft_approval/models/purchase_order.py and purchase_draft_approval/models/res_users.py.
Security and Presentation Boundaries
Odoo access controls are module-local CSV/XML data, separating authorization from model logic; examples include advance_attendance/security/approval_request_security.xml and adevx_hr_leave_rule/security/leave_access_group.xml. XML views define back-office entry points and workflows, while report templates define printable outputs. The only evident client-side customization is the partner binary-field widget at l4e_partner_custom_fields/static/src/fields/many2many_binary_confirm.js.
Main entry points: approval_request.py Approval Requests · hr_attendance.py HR Attendance Records · hr_payslip_worked_days.py Payroll & Statutory Rules · hr_leave_rule.py Leave Policy Rules
Components 19
HR, Attendance & Payroll
Attendance, leave, biometric, and payroll add-ons.
- Leave Policy Rules · Extends leave, employee, schedule, and payslip policy behavior.
adevx_hr_leave_rule/models/hr_leave_rule.py - Leave Policy UI
adevx_hr_leave_rule/views/hr_leave_rule.xml - Attendance Rules Config · Defines approval and automatic allocation rules.
advance_attendance/models/approval_config.py - Approval Requests · Tracks attendance approval decisions and HR updates.
advance_attendance/models/approval_request.py - Attendance Activity Wizard · User-driven attendance workflow action.
advance_attendance/wizard/attendance_activity_wizard.py - Attendance Automation · Runs background attendance and leave automation.
advance_attendance/data/cron.xml - BioTime Service & Terminals · Configures biometric services and terminal endpoints.
l4e_biotime_connector/models/biotime_service.py - Biometric Attendance Lines · Captures raw or intermediate biometric attendance data.
l4e_biotime_connector/models/hr_attendance_line.py - HR Attendance Records · Applies biometric and workflow changes to Odoo attendance.
l4e_biotime_connector/models/hr_attendance.py - Attendance Reports · Generates daily and monthly attendance outputs.
attendance_status_filter/models/attendance_report_wizard.py - Payroll & Statutory Rules · Applies leave worked-day and PF/ESI controls to payslips.
adevx_hr_leave_rule/models/hr_payslip_worked_days.py - Payroll Payment Report · Collects parameters and renders payment reporting.
payroll_payment_report/controllers/payment_report_controller.py
Commercial Documents
Accounting, sales, purchase, and stock extensions.
- Invoice Extension & Report · Customizes invoices and their printable report.
l4e_invoice_report/models/account_move.py - Posted Invoice Editor · Allows edits to posted invoices.
l4e_posted_invoice_editor/models/account_move.py - Transportation Charges · Applies charge workflow to sales orders.
l4e_transportation_charge/wizard/transportation_charge_wizard.py - Draft Purchase Approval · Extends purchase orders and users for draft approval.
purchase_draft_approval/models/purchase_order.py
Odoo Platform Boundaries
Shared runtime presentation and authorization mechanisms.
- Odoo Server & ORM · Loads add-ons and provides inherited models, jobs, mail, and reporting.
- Module Access Controls · Module-local groups and record access separate authorization from logic.
advance_attendance/security/approval_request_security.xml - Partner Binary Widget · Custom many-to-many binary confirmation field.
l4e_partner_custom_fields/static/src/fields/many2many_binary_confirm.js
Connections 20
- Odoo Server & ORM → Leave Policy Rules: loads inherited models
- Odoo Server & ORM → Attendance Rules Config: loads add-on
- Odoo Server & ORM → BioTime Service & Terminals: runs integration models
- Odoo Server & ORM → Payroll & Statutory Rules: computes payslips
- Odoo Server & ORM → Invoice Extension & Report: extends accounting
- Leave Policy UI → Leave Policy Rules: configures
- Module Access Controls → Approval Requests: authorizes access
- Attendance Rules Config → Approval Requests: drives approvals and allocation
- Attendance Activity Wizard → Approval Requests: creates activities
- Attendance Automation → Approval Requests: automates workflow
- Approval Requests → HR Attendance Records: updates HR records
- BioTime Service & Terminals → Biometric Attendance Lines: ingests terminal data
- Biometric Attendance Lines → HR Attendance Records: feeds attendance
- HR Attendance Records → Attendance Reports: supplies report data
- Leave Policy Rules → Payroll & Statutory Rules: contributes leave worked days
- HR Attendance Records → Payroll & Statutory Rules: contributes worked attendance
- Payroll & Statutory Rules → Payroll Payment Report: supplies payment data
- Invoice Extension & Report → Posted Invoice Editor: shares account moves
- Transportation Charges → Draft Purchase Approval: operates alongside order workflows
- Odoo Server & ORM → Partner Binary Widget: serves client customization