36 lines
2.5 KiB
Markdown
36 lines
2.5 KiB
Markdown
# POS Custom Closing
|
|
|
|
This custom module for Odoo 19 modifies the Point of Sale (POS) Closing Register modal to allow for advanced UI customizations based on the shop's preferences. It also improves workflow speed by streamlining the checkout closing process.
|
|
|
|
## Features
|
|
|
|
This module introduces a "Closing Session Customization" section within the POS settings, giving administrators the ability to conditionally display or hide specific elements on the Closing Register popup:
|
|
|
|
1. **Hide Payment Details:** Hides the breakdown of payments grouped by payment method (including the "Opening", "Payments", "Counted", and "Difference" rows).
|
|
2. **Hide Non-Cash Payment Inputs:** Hides all manual input fields for non-cash payment methods (like Bank/Card/Customer Account), leaving only the Cash Count input.
|
|
3. **Hide Cash In/Out Button:** Hides the "Cash In/Out" shortcut button from the modal footer.
|
|
4. **Hide Summary Data:** Hides the total "Orders Count" and "Orders Amount" from the top right corner of the dialog.
|
|
5. **Hide Copy Buttons:** Hides the quick copy ("clone") shortcut buttons next to the cash/payment input fields.
|
|
6. **Hide Daily Sale Button:** Hides the "Daily Sale" download report shortcut button from the modal footer.
|
|
|
|
### Streamlined Workflow (Warning Bypass)
|
|
Additionally, this module overrides the standard Odoo behavior for "Payments Difference":
|
|
- Authorized users will implicitly log differences **without seeing the warning dialog** (`"The money counted doesn't match what we expected. Want to log the difference for the books?"`).
|
|
- Simply clicking "Close Register" will finalize the process immediately, significantly speeding up the end-of-shift workflow.
|
|
|
|
## Configuration
|
|
|
|
To enable or disable any of the hiding features:
|
|
|
|
1. Ensure you have the `pos_custom_closing` module installed.
|
|
2. Navigate to **Point of Sale** -> **Configuration** -> **Settings**.
|
|
3. Scroll down to the **Closing Session Customization** section.
|
|
4. Check the desired boxes to hide those respective UI elements, and **Save**.
|
|
5. The changes will immediately apply to the next POS session you close.
|
|
|
|
## Technical Details
|
|
|
|
- **Depends:** `point_of_sale`, `pos_hr`
|
|
- **Frontend Overrides:** Conditionally injects CSS styling (`d-none`) and overrides nested elements using XPath to cleanly hide DOM elements without breaking `pos_hr`'s injected structures.
|
|
- **JavaScript Patches:** Wraps the `ClosePosPopup`'s `confirm()` method iteratively returning `this.closeSession()` to natively bypass UI dialogs.
|