feat: update version and document new realization accounting workflow and kiosk features

This commit is contained in:
Suherdy Yacob 2026-04-02 15:42:05 +07:00
parent e289392116
commit a9c9b36057
2 changed files with 36 additions and 35 deletions

View File

@ -1,52 +1,53 @@
# 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.
This module enhances Odoo's standard Expense workflow by providing account-splitting logic, an **Anonymous Expense Kiosk** for employees, and automated realization accounting.
## 🚀 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).
### 1. Dynamic Sequences
- **Employee Reimbursement (RMBS)**: Expenses paid by the employee follow the prefix `RMBS/YYYY/MM/XXXXX`.
* **Company Advance (KSBN)**: Expenses paid by the company (Kasbon) follow the prefix `KSBN/YYYY/MM/XXXXX`.
* This ensures clear separation between standard reimbursements and company-issued advances at a glance.
### 2. Enhanced Status Workflow
- **Wait Post Status (Yellow)**: A new intermediate status for company-paid expense reports.
- **Workflow**: `Approved` -> `Posted` -> **`Wait Post`** -> `Done`.
- **Logic**: The report moves to **Wait Post** after the advance is paid. It stays here until the employee submits all receipts and the accountant posts the final realization journal.
- **Done (Green)**: Only reached when all realization accounting is completed, ensuring the physical and financial cycles are fully synchronized.
### 3. Account Splitting
- **Dynamic Selection**: Automatically routes expenses to different GL accounts based on the `Paid By` field.
- **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.
### 4. Anonymous Expense Kiosk
- **PIN-Protected Access**: Secure employee login via a 4-digit PIN on a tablet interface.
- **Real-Time Totaling**: Automatically summarizes multiple physical receipts into a single realization.
- **Image Optimization**: Client-side JPEG compression (1024px, 70% quality) reduces server storage usage by ~90%.
### 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.
### 5. Automated Realization Accounting
- **Balanced Journal Entries**: Automatically calculates discrepancies between the advance paid and actual spending.
- **Discrepancy Accounts**:
- **Over-spent (Spent > Paid)**: Balance is moved to `216109 Biaya Lain yang masih harus dibayar` (Liability/Payable).
- **Under-spent (Spent < Paid)**: Balance is moved to `114101 Piutang Karyawan` (Receivable).
- **Discrepancy Settlement**:
- **Create Vendor Payment**: One-click button on the realization form to pay the employee the difference.
- **Create Customer Payment**: One-click button on the realization form to record the employee returning the excess funds.
### 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.
### 6. Validation & Security
- **Mandatory Receipts**: Prevents submission of employee-paid expenses without attachments.
- **Overdue Tracking**: Highlights missing realization receipts in red/alerts for company-paid expenses.
## 🛠 Configuration
1. **GL Accounts**:
- Go to **Expenses > Configuration > Expense Categories**.
- Under the **Accounting** tab, define the two accounts.
- **Expenses > Configuration > Expense Categories**.
- Define the two accounts under the **Accounting** tab.
2. **Kiosk Token**:
- Each company has a unique Kiosk URL found in the Settings (if implemented/exposed) or using the token: `d56db48c463444c88b86f14980d7a185`.
- URL structure: `/hr_expense/kiosk/d56db48c463444c88b86f14980d7a185`.
3. **Employee PINs**:
- Ensure employees have a 4-digit PIN set on their HR settings to use the Kiosk.
- Set 4-digit PINs on employee records for Kiosk access.
## 📋 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)
- **Models**: `hr.expense`, `hr.expense.sheet`, `hr.expense.realization`, `account.payment`
- **JS Framework**: Odoo 17 OWL

View File

@ -1,6 +1,6 @@
{
'name': 'HR Expense: Split Account by Payment Mode',
'version': '17.0.1.0.0',
'version': '17.0.1.0.1',
'summary': 'Set different expense accounts for Employee paid vs Company paid expenses on Expense Categories.',
'category': 'Human Resources/Expenses',
'author': 'Suherdy Yacob',