This commit is contained in:
Trinh Anh Ngoc
2019-12-11 14:20:12 +07:00
parent b494fbd920
commit 985be51818

View File

@@ -3,7 +3,7 @@
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import datetime
from collections import MutableMapping
from typing import Any, Optional, List, Union, Sequence, Tuple, Dict, Generator
from typing import Any, Optional, List, Union, Sequence, Tuple, Dict, Generator, TypeVar, Generic
from . import api, fields
from .api import Environment
@@ -45,7 +45,9 @@ LOG_ACCESS_COLUMNS: Any
MAGIC_COLUMNS: Any
VALID_AGGREGATE_FUNCTIONS: Any
class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
T = TypeVar('T', bound='BaseModel')
class BaseModel(MetaModel('DummyModel', (object,), {'_register': False}), Generic[T]):
_id: int
_name: str
_description: str
@@ -70,7 +72,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
def view_init(self, fields_list: Any) -> None: ...
def compute_concurrency_field(self) -> None: ...
def compute_concurrency_field_with_access(self) -> None: ...
def __new__(cls) -> BaseModel: ...
def __new__(cls: T) -> T: ...
def __init__(self, pool: Any, cr: Any) -> None: ...
def export_data(self, fields_to_export: Any, raw_data: bool = ...): ...
def load(self, fields: Any, data: Any): ...
@@ -84,7 +86,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
def get_formview_action(self, access_uid: Optional[Any] = ...): ...
def get_access_action(self, access_uid: Optional[Any] = ...): ...
def search_count(self, args: Any) -> int: ...
def search(self, args: SearchDomain, offset: int = ..., limit: Optional[int] = ..., order: Optional[str] = ..., count: bool = ...) -> BaseModel: ...
def search(self: T, args: SearchDomain, offset: int = ..., limit: Optional[int] = ..., order: Optional[str] = ..., count: bool = ...) -> T: ...
def name_get(self) -> List[Tuple[int, str]]: ...
def name_create(self, name: Any): ...
def name_search(self, name: str = ..., args: Optional[Any] = ..., operator: str = ..., limit: int = ...): ...
@@ -101,11 +103,11 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
def check_access_rule(self, operation: Any) -> None: ...
def unlink(self): ...
def write(self, vals: RecordValue): ...
def create(self, vals_list: Union[RecordValue, List[RecordValue]]) -> BaseModel: ...
def create(self: T, vals_list: Union[RecordValue, List[RecordValue]]) -> T: ...
def copy_data(self, default: Optional[Any] = ...): ...
def copy_translations(old: Any, new: Any, excluded: Any = ...): ...
def copy(self, default: Optional[Any] = ...) -> BaseModel: ...
def exists(self) -> BaseModel: ...
def copy(self: T, default: Optional[Any] = ...) -> T: ...
def exists(self: T) -> T: ...
def get_external_id(self) -> Dict[int, str]: ...
get_xml_id: Any = ...
@classmethod
@@ -114,30 +116,30 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
resolve_o2m_commands_to_record_dicts: Any = ...
def search_read(self, domain: Optional[Any] = ..., fields: Optional[Any] = ..., offset: int = ..., limit: Optional[Any] = ..., order: Optional[Any] = ...): ...
def toggle_active(self) -> None: ...
def browse(self, arg: Optional[Any] = ..., prefetch: Optional[Any] = ...) -> BaseModel: ...
def browse(self: T, arg: Optional[Any] = ..., prefetch: Optional[Any] = ...) -> T: ...
@property
def ids(self) -> List[int]: ...
def ensure_one(self): ...
def with_env(self, env: Any) -> BaseModel: ...
def sudo(self, user: Any = ...) -> BaseModel: ...
def with_context(self, *args: Any, **kwargs: Any) -> BaseModel: ...
def with_prefetch(self, prefetch: Optional[Any] = ...) -> BaseModel: ...
def with_env(self: T, env: Any) -> T: ...
def sudo(self: T, user: Any = ...) -> T: ...
def with_context(self: T, *args: Any, **kwargs: Any) -> T: ...
def with_prefetch(self: T, prefetch: Optional[Any] = ...) -> T: ...
def mapped(self, func: Any): ...
def filtered(self, func: Any) -> BaseModel: ...
def sorted(self, key: Optional[Any] = ..., reverse: bool = ...) -> BaseModel: ...
def filtered(self: T, func: Any) -> T: ...
def sorted(self: T, key: Optional[Any] = ..., reverse: bool = ...) -> T: ...
def update(self, values: RecordValue) -> None: ...
def new(self, values: RecordValue = ..., ref: Optional[Any] = ...) -> BaseModel: ...
def new(self: T, values: RecordValue = ..., ref: Optional[Any] = ...) -> T: ...
def __bool__(self) -> bool: ...
__nonzero__: Any = ...
def __len__(self) -> int: ...
def __iter__(self) -> Generator[BaseModel]: ...
def __iter__(self: T) -> Generator[T]: ...
def __contains__(self, item: Any) -> bool: ...
def __add__(self, other: Any) -> BaseModel: ...
def concat(self, *args: Any) -> BaseModel: ...
def __sub__(self, other: Any) -> BaseModel: ...
def __and__(self, other: Any) -> BaseModel: ...
def __or__(self, other: Any) -> BaseModel: ...
def union(self, *args: Any) -> BaseModel: ...
def __add__(self: T, other: Any) -> T: ...
def concat(self: T, *args: Any) -> T: ...
def __sub__(self: T, other: Any) -> T: ...
def __and__(self: T, other: Any) -> T: ...
def __or__(self: T, other: Any) -> T: ...
def union(self: T, *args: Any) -> T: ...
def __eq__(self, other: Any) -> bool: ...
def __lt__(self, other: Any) -> bool: ...
def __le__(self, other: Any) -> bool: ...