Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-05-17 15:20:35 +07:00
parent 05f4615aa8
commit f8fb2fe465

View File

@@ -1,6 +1,6 @@
from collections import defaultdict
from re import Pattern
from typing import Any, Callable, Collection, Container, Iterable, Iterator, MutableMapping, Sequence, TypeVar, Union
from typing import Any, Callable, Collection, Container, Iterable, Iterator, Literal, MutableMapping, Sequence, TypeVar, Union, overload
import psycopg2
from lxml.etree import _Element
@@ -154,7 +154,10 @@ class BaseModel(metaclass=MetaModel):
def get_formview_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
def get_access_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
def search_count(self, args: _Domain) -> int: ...
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: bool = ...) -> _ModelT | int: ...
@overload
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: Literal[False] = ...) -> _ModelT: ...
@overload
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: Literal[True] = ...) -> int: ...
def _compute_display_name(self) -> None: ...
def name_get(self) -> list[tuple[int, str]]: ...
def name_create(self, name: str) -> tuple[int, str]: ...