79456358

Date: 2025-02-21 04:47:38
Score: 0.5
Natty:
Report link

It sounds like your POS session opening and closing times are being stored or displayed with an incorrect offset, even though the container timezones are correct. This could be due to:

Timezone conversion issues in Odoo (if you're using Odoo) Database storing UTC while UI displays local time incorrectly Misconfigured user timezone settings If you want to fix this manually via a Server Action without reinstalling everything, you can write an Odoo server action in Python to adjust the session times. Here's how you can do it:

Steps to Fix via Server Action Navigate to: Settings > Technical > Actions > Server Actions

Create a New Server Action

Model: POS Session (pos.session) Action Type: Execute Python Code Use this Python script in the server action:

Select the affected records Run the Server Action manually Alternative: Prompt User for Input (Manual Adjustment) If you want to manually enter the correct date, you need to trigger a wizard (popup) instead of a direct Server Action. However, Odoo Server Actions do not support interactive input boxes directly. You'd need to create a custom module with a wizard (TransientModel) that allows user input before applying changes.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gaurav Mishra