Go to file
2026-04-02 15:35:22 +07:00
controllers feat: implement HR expense kiosk interface for employee self-service expense reporting and realization 2026-04-01 17:19:17 +07:00
data feat: implement split expense sequences and add wait_post state for company-paid expenses with pending realizations 2026-04-02 15:35:22 +07:00
models feat: implement split expense sequences and add wait_post state for company-paid expenses with pending realizations 2026-04-02 15:35:22 +07:00
security feat: implement expense realization module with receipt tracking and automated journal entries 2026-04-01 13:56:03 +07:00
static/src/kiosk feat: implement HR expense kiosk interface for employee self-service expense reporting and realization 2026-04-01 17:19:17 +07:00
views feat: implement split expense sequences and add wait_post state for company-paid expenses with pending realizations 2026-04-02 15:35:22 +07:00
__init__.py feat: implement HR expense kiosk interface for employee self-service expense reporting and realization 2026-04-01 17:19:17 +07:00
__manifest__.py feat: implement HR expense kiosk interface for employee self-service expense reporting and realization 2026-04-01 17:19:17 +07:00
.gitignore first commit 2026-03-31 17:25:04 +07:00
README.md feat: implement expense realization payment tracking and automated balancing journal entries 2026-04-02 11:12:40 +07:00

HR Expense Account Split & Kiosk

This module enhances Odoo's standard Expense workflow by providing account-splitting logic and an Anonymous Expense Kiosk for employees.

🚀 Features

1. Account Splitting

  • Dynamic Account Selection: Automatically routes expenses to different GL accounts based on whether they were paid by the Employee (Reimburse) or the Company (Kasbon).
  • Configuration: Set distinct Expense Account (Employee) and Expense Account (Company) directly on the Expense Category form.

2. Anonymous Expense Kiosk

  • PIN-Protected Access: Secure employee login via a 4-digit PIN on a tablet/touchscreen interface.
  • Two Workflows:
    • New Expense: Submit a reimbursement request instantly.
    • Upload Receipt (Realization): Upload physical receipts for approved Kasbon expenses.
  • Real-Time Totaling: Automatically summarizes amounts when multiple receipts are added.

3. Multiple Receipt Support

  • Dynamic Lines: Support for adding multiple physical receipts (lines) to a single realization.
  • Backend Tracking: Creates hr.expense.realization.line records for each physical receipt, each with its own attachment.

4. Image Optimization

  • Client-Side Compression: Photos are automatically resized to 1024px and compressed to 70% JPEG quality before upload.
  • Fast Experience: Reduces mobile data usage and saves up to 90% of server storage for receipt images.

5. Validation & Security

  • Mandatory Receipts:
    • Backend prevents submission of employee-paid expenses if no receipt is attached.
    • Kiosk requires a photo upload for all reimbursement-type expenses.
  • Overdue Tracking: Automatically calculates and highlights overdue receipts for Kasbon realizations.
  • Simplified UI: Standard "Split Expense" and other distracting buttons are hidden in the backend to maintain a focused workflow.

6. Realization Accounting Logic

  • Automated Clearing: Automatically balances the difference between the original advance (Kasbon) and actual receipts using a Clearing Account (218401).
  • Scenario 1 (Spent > Paid): Records the extra amount as a credit in the clearing account (Liability to employee).
  • Scenario 2 (Spent < Paid): Records the remaining balance as a debit in the clearing account (Employee owes back).
  • Dynamic Discovery: Attempts to use the exact bank/outstanding account from the original payment for seamless reconciliation.

🛠 Configuration

  1. GL Accounts:
    • Go to Expenses > Configuration > Expense Categories.
    • Under the Accounting tab, define the two accounts.
  2. Kiosk Token:
    • Each company has a unique Kiosk URL found in the Settings (if implemented/exposed) or using the token: d56db48c463444c88b86f14980d7a185.
  3. Employee PINs:
    • Ensure employees have a 4-digit PIN set on their HR settings to use the Kiosk.

📋 Technical Notes

  • Controller: /hr_expense/kiosk/<token>
  • Models: hr.expense, hr.expense.realization, hr.expense.realization.line
  • JS Framework: Odoo 17 OWL (Odoo Web Library)