Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-05-17 14:16:30 +07:00
parent bcd2369b94
commit b90c5a3272

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
@@ -148,7 +148,10 @@ class BaseModel(metaclass=MetaModel):
def _rec_name_fallback(self) -> str: ...
def user_has_groups(self, groups: str) -> bool: ...
def search_count(self, domain: _Domain, limit: int | None = ...) -> int: ...
def search(self: _ModelT, domain: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: bool = ...) -> _ModelT | int: ...
@overload
def search(self: _ModelT, domain: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: Literal[False] = ...) -> _ModelT: ...
@overload
def search(self: _ModelT, domain: _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]: ...