POS Session Closing Errors
When trying to close a POS session, you encounter:
UserError: You cannot close this session. There are still pending orders.
UserError: The session cannot be closed because the closing balance does not match.
Expected: $5,000.00 | Actual: $4,850.00 | Difference: -$150.00
UserError: This session is still being used by another user.
Error: The session cannot be closed because some payments have not been processed.Fix 1: Pending Orders Blocking Close
# All orders must be synced before closing
# Check for pending orders:
# In POS interface, look for sync indicator
# Sync all pending orders first
# If orders won't sync (see POS offline sync guide):
# Fix the sync issue first, then close the session
# Check in backend:
# Point of Sale > Orders > filter by session
# Verify all orders have state = 'paid' or 'done'
sudo -u postgres psql -d mydb -c "
SELECT po.name, po.state, po.amount_total, po.session_id
FROM pos_order po
WHERE po.session_id = SESSION_ID
AND po.state NOT IN ('paid', 'done', 'invoiced', 'cancel');
"Fix 2: Cash Balance Mismatch
# The closing cash amount must be entered accurately
# When closing:
# 1. Count the physical cash in the drawer
# 2. Enter the exact amount in the closing screen
# 3. Odoo shows the expected amount and the difference
# If the difference is acceptable:
# Click "Close" — the difference is recorded as a profit/loss entry
# If you need to investigate:
# Check for:
# - Cash payments that weren't recorded in POS
# - Change given incorrectly
# - Cash added/removed without recording (cash in/out)
# - Opening balance was wrong
# Use the POS cash in/out feature:
# POS > hamburger menu > Cash In/Out
# Record any cash movements during the sessionFix 3: Session Used by Another User
# Only one user can operate a POS session at a time
# Check who is using the session:
# Point of Sale > Sessions > check the "Responsible" field
# If the session is "stuck" with another user:
# 1. Ask the user to close the POS browser tab
# 2. Wait a few minutes for the session lock to release
# 3. Then attempt to close from the backend
# Force release:
# Point of Sale > Sessions > select session
# Click "Close" button from the backend form viewFix 4: Force Close Session from Backend
# If the POS interface won't close the session:
# Backend approach:
# Point of Sale > Sessions > select the stuck session
# Click "Close" or "Force Close" button
# This posts all accounting entries and closes the session
# Cash difference is recorded automatically
# If the Close button is not available:
# The session may have accounting errors
# Check the Odoo log for error details:
# grep "pos.session" /var/log/odoo/odoo.log | tail -20Fix 5: Payment Method Configuration Issues
# If a payment method has unprocessed payments:
# Check payment method configuration:
# Point of Sale > Configuration > Payment Methods
# Verify each method has:
# - A journal assigned
# - Correct outstanding account
# - Terminal configuration (if electronic)
# If a card terminal has pending transactions:
# Complete or void them on the terminal first
# Then retry session closeFix 6: Accounting Entry Errors
# Session close creates journal entries for all payments
# If accounting is misconfigured, the entries fail
# Common issues:
# - Missing intermediate account on payment method
# - Receivable account not set on POS config
# - Journal for POS not configured
# Check POS config:
# Point of Sale > Configuration > Point of Sale
# Accounting tab > verify all accounts are set
# Check the error in logs:
sudo -u postgres psql -d mydb -c "
SELECT ps.name, ps.state, ps.cash_register_balance_end_real,
ps.cash_register_balance_start
FROM pos_session ps
WHERE ps.id = SESSION_ID;
"Fix 7: Emergency Session Reset
# Last resort for completely stuck sessions:
sudo -u postgres psql -d mydb -c "
-- Check current state
SELECT id, name, state FROM pos_session WHERE id = SESSION_ID;
-- Force to closing state (allows backend close)
UPDATE pos_session SET state = 'closing_control'
WHERE id = SESSION_ID;
"
# Then close from backend:
# Point of Sale > Sessions > select > Close
# WARNING: This may skip validation checks
# Verify accounting entries manually after force closePrevention
DeployMonkey's AI agent monitors POS session health and alerts on balance discrepancies. The agent validates payment method configurations and ensures clean session closes without accounting errors.