POS Session Close Auto
Automatically close open Point of Sale sessions at a configured time every day through a scheduled background job. Enable the feature per POS shop, set the closing hour, and Odoo handles everything — no manual intervention needed.
100%
POS Based
odoo 19
Compatible
LGPL-3
License
Key Features
Auto Close Session Toggle
Each POS configuration gains an Auto Close Session. When disabled the shop behaves as normal; when enabled the cron will close it at the configured time. The setting is independent per shop — no global switch.
Configurable Close Time (HH:MM)
A Auto Close Time rendered with the float_time widget lets managers pick an exact closing hour (0 – 23:59). Default is 23:00. A validation constraint rejects values outside the 00:00–23:59 range.
Scheduled Cron Job (Every 15 Minutes)
An scheduler record installed with the module runs every 15 minutes as the superuser. It scans all sessions in opened or opening_control state and closes those whose configured time has passed.
Company Timezone Awareness
The cron converts the current UTC time into the company's local timezone (via pytz using the company partner's tz field) before comparing it to the configured close time. Sessions are closed at the correct wall-clock hour regardless of where the server is hosted.
Graceful Error Handling
If raises a UserError (e.g. draft orders still open), the failure is logged as a warning and the cron continues to the next session. Unexpected exceptions are captured with logger.exception() so the full traceback is available for debugging without halting the job.
Native POS Settings Integration
Both fields are surfaced through res.config.settings (related fields, readonly=False) so they appear directly in Point of Sale → Configuration → Settings. They also appear on the POS config form under a dedicated Auto Close tab — no extra menu navigation required.
How to Configure
Step 1 — Install the module
Install POS Session Auto Close
(mv_pos_session_close_auto) from the Apps menu or via:
The cron job is created automatically on install and runs every 15 minutes.
Step 2 — Enable Auto Close on a POS shop
Go to Point of Sale → Configuration → Settings, select the POS shop from the top selector, then enable Auto Close Session. Set the Close Time using the HH:MM picker.
Alternatively open the POS config form directly (Point of Sale → Configuration → Point of Sale), switch to the Auto Close tab, and tick Auto Close Session.
Step 3 — Let the cron run
No further action is needed. Every 15 minutes the cron checks all open sessions. When the current local time is ≥ the configured close time, the session is closed via the standard Odoo POS closing flow.
You can monitor or manually trigger the cron via Technical → Automation → Scheduled Actions → POS: Auto Close Sessions.
Our Services
We offer professional solutions to help you expand, maintain, and customize your odoo systems.
odoo Customization
odoo Implementation
odoo Support
odoo Migration
Need Help or Customization?
POS Session Close Auto is proudly developed by Marutiverse. We provide dedicated support and are open to customizations tailored to your specific business requirements.
Please log in to comment on this module