Skip to content

Async Helpdesk

AsyncHelpdeskNamespace for the helpdesk.ticket model (Odoo Enterprise), accessed as client.helpdesk on AsyncOdooClient.

helpdesk

Async helpdesk domain namespace for Vodoo.

AsyncHelpdeskNamespace

AsyncHelpdeskNamespace(client: AsyncOdooClient)

Bases: _HelpdeskAttrs, AsyncDomainNamespace

Async namespace for helpdesk.ticket operations.

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

create async

create(name: str, *, description: str | None = None, partner_id: int | None = None, tag_ids: list[int] | None = None, team_id: int | None = None, **extra_fields: Any) -> int

Create a helpdesk ticket.

PARAMETER DESCRIPTION
name

Ticket title/name.

TYPE: str

description

Ticket description (HTML or plain text).

TYPE: str | None DEFAULT: None

partner_id

Customer partner ID.

TYPE: int | None DEFAULT: None

tag_ids

List of tag IDs to apply.

TYPE: list[int] | None DEFAULT: None

team_id

Helpdesk team ID.

TYPE: int | None DEFAULT: None

**extra_fields

Additional fields to set on the ticket.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
int

ID of created ticket.

Source code in src/vodoo/aio/helpdesk.py
async def create(
    self,
    name: str,
    *,
    description: str | None = None,
    partner_id: int | None = None,
    tag_ids: list[int] | None = None,
    team_id: int | None = None,
    **extra_fields: Any,
) -> int:
    """Create a helpdesk ticket.

    Args:
        name: Ticket title/name.
        description: Ticket description (HTML or plain text).
        partner_id: Customer partner ID.
        tag_ids: List of tag IDs to apply.
        team_id: Helpdesk team ID.
        **extra_fields: Additional fields to set on the ticket.

    Returns:
        ID of created ticket.
    """
    values = _build_ticket_values(
        name,
        description=description,
        partner_id=partner_id,
        tag_ids=tag_ids,
        team_id=team_id,
        **extra_fields,
    )
    return await self._client.create(self._model, values)