Update stubs

This commit is contained in:
Trinh Anh Ngoc
2021-11-27 15:50:53 +07:00
parent 8012e016f0
commit c714df4222

View File

@@ -1,11 +1,13 @@
from collections import MutableMapping
from typing import Any, Generator, List
from typing import Any, Generator, List, TypeVar
from . import api, fields
from .api import Environment
from .modules.registry import Registry
from .sql_db import Cursor
_M = TypeVar('_M')
_logger: Any
_schema: Any
_unlink: Any
@@ -133,7 +135,7 @@ class BaseModel:
def get_formview_action(self): ...
def get_access_action(self): ...
def search_count(self, args) -> int: ...
def search(self, args, offset: int = ..., limit: Any | None = ..., order: Any | None = ..., count: bool = ...) -> BaseModel: ...
def search(self: _M, args, offset: int = ..., limit: Any | None = ..., order: Any | None = ..., count: bool = ...) -> _M: ...
def _compute_display_name(self) -> None: ...
def name_get(self): ...
def name_create(self, name): ...
@@ -196,7 +198,7 @@ class BaseModel:
def unlink(self): ...
def write(self, vals): ...
def _write(self, vals): ...
def create(self, vals) -> BaseModel: ...
def create(self: _M, vals) -> _M: ...
def _create(self, vals): ...
def _where_calc(self, domain, active_test: bool = ...): ...
def _check_qorder(self, word): ...
@@ -208,8 +210,8 @@ class BaseModel:
def _search(self, args, offset: int = ..., limit: Any | None = ..., order: Any | None = ..., count: bool = ..., access_rights_uid: Any | None = ...): ...
def copy_data(self, default: Any | None = ...): ...
def copy_translations(old, new): ...
def copy(self, default: Any | None = ...) -> BaseModel: ...
def exists(self) -> BaseModel: ...
def copy(self: _M, default: Any | None = ...) -> _M: ...
def exists(self: _M) -> _M: ...
def _check_recursion(self, parent: Any | None = ...): ...
def _check_m2m_recursion(self, field_name): ...
def _get_external_ids(self): ...
@@ -232,41 +234,41 @@ class BaseModel:
@classmethod
def _revert_method(cls, name) -> None: ...
@classmethod
def _browse(cls, ids, env, prefetch: Any | None = ...) -> BaseModel: ...
def browse(self, arg: Any | None = ..., prefetch: Any | None = ...) -> BaseModel: ...
def _browse(cls, ids, env, prefetch: Any | None = ...): ...
def browse(self: _M, arg: Any | None = ..., prefetch: Any | None = ...) -> _M: ...
@property
def ids(self) -> List[str]: ...
_cr: Cursor
_uid: int
_context: dict
def ensure_one(self) -> BaseModel: ...
def with_env(self, env) -> BaseModel: ...
def sudo(self, user=...) -> BaseModel: ...
def with_context(self, *args, **kwargs) -> BaseModel: ...
def with_prefetch(self, prefetch: Any | None = ...) -> BaseModel: ...
def ensure_one(self: _M) -> _M: ...
def with_env(self: _M, env) -> _M: ...
def sudo(self: _M, user=...) -> _M: ...
def with_context(self: _M, *args, **kwargs) -> _M: ...
def with_prefetch(self: _M, prefetch: Any | None = ...) -> _M: ...
def _convert_to_cache(self, values, update: bool = ..., validate: bool = ...): ...
def _convert_to_record(self, values): ...
def _convert_to_write(self, values): ...
def _mapped_func(self, func): ...
def mapped(self, func): ...
def _mapped_cache(self, name_seq): ...
def filtered(self, func) -> BaseModel: ...
def sorted(self, key: Any | None = ..., reverse: bool = ...) -> BaseModel: ...
def filtered(self: _M, func) -> _M: ...
def sorted(self: _M, key: Any | None = ..., reverse: bool = ...) -> _M: ...
def update(self, values) -> None: ...
def new(self, values=...) -> BaseModel: ...
def new(self: _M, values=...) -> _M: ...
def _is_dirty(self): ...
def _get_dirty(self): ...
def _set_dirty(self, field_name) -> None: ...
def __nonzero__(self): ...
def __len__(self) -> int: ...
def __iter__(self) -> Generator[BaseModel]: ...
def __iter__(self: _M) -> Generator[_M]: ...
def __contains__(self, item) -> bool: ...
def __add__(self, other) -> BaseModel: ...
def concat(self, *args) -> BaseModel: ...
def __sub__(self, other) -> BaseModel: ...
def __and__(self, other) -> BaseModel: ...
def __or__(self, other) -> BaseModel: ...
def union(self, *args) -> BaseModel: ...
def __add__(self: _M, other) -> _M: ...
def concat(self: _M, *args) -> _M: ...
def __sub__(self: _M, other) -> _M: ...
def __and__(self: _M, other) -> _M: ...
def __or__(self: _M, other) -> _M: ...
def union(self: _M, *args) -> _M: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __lt__(self, other) -> bool: ...