Daily updates from Odoo
Sunday, June 21, 2026
1 change · master
Resolved issues and error corrections
This update fixes a bug where the Timesheet Assistant was incorrectly suggesting ActivityWatch time entries, leading to duplicate timesheet records. The change prevents this by blocking suggestions for already logged time, ensuring accurate timesheet data. A new test has been added to verify the fix.
Original PR description
Currently, the Timesheet Assistant suggests ActivityWatch events for time periods that the user has already explicitly logged (e.g., using the systray timer or manual entry). If the user accepts these suggestions, it results in duplicate timesheet entries.
This commit fixes the issue by introducing a new event getter (`get_logged_timesheet_events`) with sequence 5. It calculates a blackout period (`create_date` minus `unit_amount`) for already saved timesheets and passes `{'status': 'afk'}` in the event data.
This forces the JavaScript frontend to clip any overlapping ActivityWatch data, while the `afk` status ensures the blackout block itself remains hidden from the assistant UI.
A unit test has been added to ensure the blackout math and data structure remain intact.
Task: 6216903