43 lines
2.5 KiB
Markdown
43 lines
2.5 KiB
Markdown
# POS Edit Payment Method
|
|
|
|
An Odoo 19 module designed to allow **POS Managers** to safely edit the payment method used in Point of Sale Orders under specific conditions, while maintaining strict control over other financial fields (like nominal amount and date).
|
|
|
|
## Key Features
|
|
|
|
- 👤 **Access Limitation**: Only users belonging to the **POS Manager** group (`point_of_sale.group_pos_manager`) can edit the payment method. For standard POS Users, the fields remain completely read-only.
|
|
- 🔒 **Dynamic Checks & Rules**: Editing is only permitted if:
|
|
- The POS Session of the order is **not closed**.
|
|
- The POS Order state is **not Done or Cancelled**.
|
|
- The order **does not have a posted invoice**.
|
|
- None of the payments in the order have a **posted accounting journal entry**.
|
|
- 🚫 **Tamper Prevention**: Other financial fields, such as **amount (nominal)**, **date**, and **card details** are strictly read-only and cannot be manually edited. Standard creation or deletion of payments from the backend list view is disabled (`create="0"` and `delete="0"`).
|
|
- 💬 **Odoo Chatter Integration**: Seamlessly leverages Odoo's native change tracking system to automatically log changes in the POS Order chatter (e.g., *• BCA changed to BTN for Rp 17,001.00*).
|
|
|
|
## Installation
|
|
|
|
1. Place the `pos_edit_payment_method` directory inside your custom Odoo addons path.
|
|
2. Restart your Odoo server instance.
|
|
3. Log in to your Odoo database as an Administrator.
|
|
4. Activate **Developer Mode** (Settings -> Activate the developer mode).
|
|
5. Navigate to the **Apps** menu and click **Update Apps List**.
|
|
6. Search for `POS Edit Payment Method` in the Apps search bar.
|
|
7. Click **Activate** (or **Install**).
|
|
|
|
## Usage Guide
|
|
|
|
1. Go to **Point of Sale** -> **Orders** -> **Orders**.
|
|
2. Open a POS order whose session is still in progress (not closed).
|
|
3. Under the **Payments** tab, double-click or inline-edit the **Payment Method** field. Note that other fields (like **Amount** and **Date**) are strictly locked.
|
|
4. Save the order.
|
|
5. Review the **Chatter** on the right to see the automatic change log entry.
|
|
6. Test using an order whose session has already been closed. Verify that the payment method field is locked and cannot be edited.
|
|
7. Test logging in as a standard POS User (non-manager). Verify that all fields in the payments tab are locked.
|
|
|
|
## Technical Details
|
|
|
|
- **Dependencies**: `point_of_sale`
|
|
- **Category**: `Point of Sale`
|
|
- **License**: `LGPL-3`
|
|
- **Author**: `Suherdy Yacob`
|
|
- **Version**: `19.0.1.0.0`
|