Async Timers¶
AsyncTimerNamespace for timer and timesheet management, accessed as client.timer on AsyncOdooClient.
timer
¶
Async Odoo timer (timesheet) operations.
Mirrors :mod:vodoo.timer with async methods.
Reuses all data classes and parsing logic from the sync module.
AsyncTimerBackend
¶
Bases: ABC
Version-specific async timer behavior.
enrich_with_running_state
abstractmethod
async
¶
enrich_with_running_state(timesheets: list[Timesheet], client: AsyncOdooClient, uid: int) -> list[Timesheet]
start_timer
abstractmethod
async
¶
start_timer(timesheet: Timesheet, client: AsyncOdooClient) -> None
stop_timer
abstractmethod
async
¶
stop_timer(timesheet: Timesheet, client: AsyncOdooClient) -> Any
AsyncOdoo19TimerBackend
¶
AsyncLegacyTimerBackend
¶
AsyncTimerHandle
dataclass
¶
AsyncTimerHandle(_namespace: AsyncTimerNamespace, _source_kind: str, _source_id: int)
Handle returned by start_*() — call :meth:stop to stop this specific timer.
stop
async
¶
Stop the timer that was started with this handle.
Source code in src/vodoo/aio/timer.py
AsyncTimerNamespace
¶
AsyncTimerNamespace(client: AsyncOdooClient)
Async namespace for timer (timesheet) operations.
Source code in src/vodoo/aio/timer.py
list
async
¶
Fetch timesheets for the current user.
| PARAMETER | DESCRIPTION |
|---|---|
days
|
How many days back to include.
TYPE:
|
limit
|
Maximum number of records to return (
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Timesheet]
|
Timesheets sorted by date descending. |
Source code in src/vodoo/aio/timer.py
start_ticket
async
¶
start_ticket(ticket_id: int) -> AsyncTimerHandle
Start a timer on a helpdesk ticket.
start_timesheet
async
¶
start_timesheet(timesheet_id: int) -> AsyncTimerHandle
Start a timer on an existing timesheet.
Source code in src/vodoo/aio/timer.py
stop_timesheet
async
¶
Stop a timer on an existing timesheet.