2.5 KiB
2.5 KiB
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:
- Hide Payment Details: Hides the breakdown of payments grouped by payment method (including the "Opening", "Payments", "Counted", and "Difference" rows).
- 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.
- Hide Cash In/Out Button: Hides the "Cash In/Out" shortcut button from the modal footer.
- Hide Summary Data: Hides the total "Orders Count" and "Orders Amount" from the top right corner of the dialog.
- Hide Copy Buttons: Hides the quick copy ("clone") shortcut buttons next to the cash/payment input fields.
- 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:
- Ensure you have the
pos_custom_closingmodule installed. - Navigate to Point of Sale -> Configuration -> Settings.
- Scroll down to the Closing Session Customization section.
- Check the desired boxes to hide those respective UI elements, and Save.
- 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 breakingpos_hr's injected structures. - JavaScript Patches: Wraps the
ClosePosPopup'sconfirm()method iteratively returningthis.closeSession()to natively bypass UI dialogs.