Skip to content

Async Projects

AsyncProjectNamespace for the project.project model, accessed as client.projects on AsyncOdooClient.

projects

Async project (project.project) operations for Vodoo.

AsyncProjectNamespace

AsyncProjectNamespace(client: AsyncOdooClient)

Bases: _ProjectAttrs, AsyncDomainNamespace

Async namespace for project.project operations.

Source code in src/vodoo/aio/_domain.py
def __init__(self, client: AsyncOdooClient) -> None:
    self._client = client

stages async

stages(project_id: int | None = None) -> list[dict[str, Any]]

List task stages, optionally filtered by project.

PARAMETER DESCRIPTION
project_id

Project ID to filter stages (None = all stages)

TYPE: int | None DEFAULT: None

RETURNS DESCRIPTION
list[dict[str, Any]]

List of stage dictionaries with id, name, sequence, fold

Source code in src/vodoo/aio/projects.py
async def stages(self, project_id: int | None = None) -> list[dict[str, Any]]:
    """List task stages, optionally filtered by project.

    Args:
        project_id: Project ID to filter stages (None = all stages)

    Returns:
        List of stage dictionaries with id, name, sequence, fold

    """
    domain: list[Any] = []
    if project_id is not None:
        domain.append(("project_ids", "in", [project_id]))

    return await self._client.search_read(
        "project.task.type",
        domain=domain,
        fields=STAGE_FIELDS,
        order="sequence",
    )