3.1 KiB
3.1 KiB
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)andExpense 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.linerecords 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
- GL Accounts:
- Go to Expenses > Configuration > Expense Categories.
- Under the Accounting tab, define the two accounts.
- Kiosk Token:
- Each company has a unique Kiosk URL found in the Settings (if implemented/exposed) or using the token:
d56db48c463444c88b86f14980d7a185.
- Each company has a unique Kiosk URL found in the Settings (if implemented/exposed) or using the token:
- 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)