mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
Update stubs
This commit is contained in:
@@ -5,11 +5,10 @@ from concurrent.futures import Future
|
||||
from itertools import count
|
||||
from subprocess import Popen
|
||||
from threading import Thread
|
||||
from typing import Any, Callable, Generator, Generic, Iterator, Mapping, Match, TypeVar
|
||||
from typing import Any, Callable, Generator, Mapping, Match, TypeVar
|
||||
from xmlrpc import client as xmlrpclib
|
||||
|
||||
import requests
|
||||
from lxml.etree import _Element
|
||||
from websocket import WebSocket
|
||||
|
||||
from . import case
|
||||
@@ -25,8 +24,6 @@ from ..tools.profiler import Profiler
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_CallableT = TypeVar('_CallableT', bound=Callable)
|
||||
_ModelT = TypeVar('_ModelT', bound=BaseModel)
|
||||
_FormT = TypeVar('_FormT', bound=Form)
|
||||
|
||||
InvalidStateError = Any
|
||||
ADDONS_PATH: str
|
||||
@@ -229,83 +226,4 @@ def no_retry(arg: _T) -> _T: ...
|
||||
def users(*logins: str) -> Callable[[_CallableT], _CallableT]: ...
|
||||
def warmup(func: _CallableT, *args, **kwargs) -> _CallableT: ...
|
||||
def can_import(module: str) -> bool: ...
|
||||
|
||||
class Form(Generic[_ModelT]):
|
||||
_env: Environment
|
||||
_model: _ModelT
|
||||
_view: dict
|
||||
_values: dict
|
||||
_changed: set
|
||||
def __init__(self, recordp: _ModelT, view: _ModelT | str | None = ...) -> None: ...
|
||||
def _get_view_fields(self, node: _Element, model: BaseModel) -> dict: ...
|
||||
def _o2m_set_edition_view(self, descr: dict, node: _Element, level: int) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
def _process_fvg(self, model: BaseModel, fvg: dict, level: int = ...) -> None: ...
|
||||
def _init_from_defaults(self, model: BaseModel) -> None: ...
|
||||
def _init_from_values(self, values: BaseModel) -> None: ...
|
||||
def __getattr__(self, field: str): ...
|
||||
def _get_modifier(self, field: str, modifier: str, *, default: Any = ..., view: Any = ..., modmap: Any | None = ...,
|
||||
vals: Any | None = ...): ...
|
||||
_OPS: dict[str, Callable[..., bool]]
|
||||
def _get_context(self, field: str): ...
|
||||
def __setattr__(self, field: str, value) -> None: ...
|
||||
def __enter__(self: _FormT) -> _FormT: ...
|
||||
def __exit__(self, etype, _evalue, _etb) -> None: ...
|
||||
def save(self) -> _ModelT: ...
|
||||
def _values_to_save(self, all_fields: bool = ...) -> dict: ...
|
||||
def _values_to_save_(self, record_values: dict, fields: dict, view: Any, changed: set, all_fields: bool = ...,
|
||||
modifiers_values: dict | None = ..., parent_link: Any | None = ...) -> dict: ...
|
||||
def _perform_onchange(self, fields: list[str], context: dict | None = ...) -> dict: ...
|
||||
def _onchange_values(self) -> dict: ...
|
||||
def _onchange_values_(self, fields, record: dict) -> dict: ...
|
||||
def _cleanup_onchange(self, descr: dict, value, current): ...
|
||||
|
||||
class O2MForm(Form):
|
||||
_proxy: O2MProxy
|
||||
_index: int | None
|
||||
def __init__(self, proxy: O2MProxy, index: int | None = ...) -> None: ...
|
||||
def _get_modifier(self, field: str, modifier: str, *, default: Any = ..., view: Any = ..., modmap: Any | None = ...,
|
||||
vals: Any | None = ...): ...
|
||||
def _onchange_values(self) -> dict: ...
|
||||
def save(self) -> None: ...
|
||||
def _values_to_save(self, all_fields: bool = ...) -> UpdateDict: ...
|
||||
|
||||
class UpdateDict(dict):
|
||||
_changed: set
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def changed_items(self) -> Iterator[tuple[Any, Any]]: ...
|
||||
def update(self, *args, **kw) -> None: ...
|
||||
|
||||
class X2MProxy:
|
||||
_parent: Form
|
||||
_field: str
|
||||
def _assert_editable(self) -> None: ...
|
||||
|
||||
class O2MProxy(X2MProxy):
|
||||
_records: list[dict]
|
||||
def __init__(self, parent: Form, field: str) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
@property
|
||||
def _model(self) -> BaseModel: ...
|
||||
@property
|
||||
def _descr(self) -> dict: ...
|
||||
def _command_index(self, for_record: int) -> int: ...
|
||||
def new(self) -> O2MForm: ...
|
||||
def edit(self, index: int): ...
|
||||
def remove(self, index: int) -> None: ...
|
||||
|
||||
class M2MProxy(X2MProxy, collections.Sequence):
|
||||
def __init__(self, parent: Form, field: str) -> None: ...
|
||||
def __getitem__(self, it) -> BaseModel: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[BaseModel]: ...
|
||||
def __contains__(self, record: BaseModel) -> bool: ...
|
||||
def add(self, record: BaseModel) -> None: ...
|
||||
def _get_ids(self) -> list[int]: ...
|
||||
def remove(self, id: int | None = ..., index: int | None = ...) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
|
||||
def record_to_values(fields: dict, record: BaseModel) -> dict: ...
|
||||
def _cleanup_from_default(type_: str, value): ...
|
||||
def _get_node(view, f, *arg): ...
|
||||
def tagged(*tags: str) -> Callable[[_CallableT], _CallableT]: ...
|
||||
|
||||
Reference in New Issue
Block a user