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:
0
odoo-stubs/__main__.pyi
Normal file
0
odoo-stubs/__main__.pyi
Normal file
@@ -50,10 +50,7 @@ class Environment(Mapping[str, BaseModel]):
|
|||||||
uid: int = ...
|
uid: int = ...
|
||||||
context: dict[str, Any] = ...
|
context: dict[str, Any] = ...
|
||||||
su: bool = ...
|
su: bool = ...
|
||||||
envs: None
|
|
||||||
args: tuple[Cursor, int, dict, bool]
|
args: tuple[Cursor, int, dict, bool]
|
||||||
@classmethod
|
|
||||||
def manage(cls) -> Generator[None, None, None]: ...
|
|
||||||
def reset(self) -> None: ...
|
def reset(self) -> None: ...
|
||||||
all: Transaction
|
all: Transaction
|
||||||
transaction: Transaction
|
transaction: Transaction
|
||||||
@@ -83,7 +80,6 @@ class Environment(Mapping[str, BaseModel]):
|
|||||||
@property
|
@property
|
||||||
def lang(self) -> str: ...
|
def lang(self) -> str: ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
def clear_upon_failure(self): ...
|
|
||||||
def invalidate_all(self, flush: bool = ...) -> None: ...
|
def invalidate_all(self, flush: bool = ...) -> None: ...
|
||||||
def _recompute_all(self) -> None: ...
|
def _recompute_all(self) -> None: ...
|
||||||
def flush_all(self) -> None: ...
|
def flush_all(self) -> None: ...
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ from .models import BaseModel
|
|||||||
|
|
||||||
class UserError(Exception):
|
class UserError(Exception):
|
||||||
def __init__(self, message: str) -> None: ...
|
def __init__(self, message: str) -> None: ...
|
||||||
@property
|
|
||||||
def name(self): ...
|
|
||||||
|
|
||||||
class RedirectWarning(Exception):
|
class RedirectWarning(Exception):
|
||||||
def __init__(self, message: str, action: int, button_text: str, additional_context: dict | None = ...) -> None: ...
|
def __init__(self, message: str, action: int, button_text: str, additional_context: dict | None = ...) -> None: ...
|
||||||
@@ -25,9 +23,3 @@ class CacheMiss(KeyError):
|
|||||||
|
|
||||||
class MissingError(UserError): ...
|
class MissingError(UserError): ...
|
||||||
class ValidationError(UserError): ...
|
class ValidationError(UserError): ...
|
||||||
|
|
||||||
class except_orm(UserError):
|
|
||||||
def __init__(self, name, value: Any | None = ...) -> None: ...
|
|
||||||
|
|
||||||
class Warning(UserError):
|
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _mapped_func(self, func: Callable): ...
|
def _mapped_func(self, func: Callable): ...
|
||||||
def mapped(self, func: Callable | str): ...
|
def mapped(self, func: Callable | str): ...
|
||||||
def filtered(self: _ModelT, func: Callable | str) -> _ModelT: ...
|
def filtered(self: _ModelT, func: Callable | str) -> _ModelT: ...
|
||||||
|
def grouped(self: _ModelT, key: Callable | str) -> dict[Any, _ModelT]: ...
|
||||||
def filtered_domain(self: _ModelT, domain: _Domain) -> _ModelT: ...
|
def filtered_domain(self: _ModelT, domain: _Domain) -> _ModelT: ...
|
||||||
def sorted(self: _ModelT, key: Callable | str | None = ..., reverse: bool = ...) -> _ModelT: ...
|
def sorted(self: _ModelT, key: Callable | str | None = ..., reverse: bool = ...) -> _ModelT: ...
|
||||||
def update(self, values: dict[str, Any]) -> None: ...
|
def update(self, values: dict[str, Any]) -> None: ...
|
||||||
|
|||||||
@@ -1,24 +1,13 @@
|
|||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
from typing import Any, Literal, MutableSequence
|
from typing import Any, Literal
|
||||||
|
|
||||||
from ..tools import pycompat as pycompat
|
from ..tools import pycompat as pycompat
|
||||||
|
|
||||||
MANIFEST_NAMES: tuple[str, ...]
|
MANIFEST_NAMES: tuple[str, ...]
|
||||||
README: list[str]
|
README: list[str]
|
||||||
_DEFAULT_MANIFEST: dict[str, Any]
|
_DEFAULT_MANIFEST: dict[str, Any]
|
||||||
|
|
||||||
def ad_paths() -> MutableSequence[str]: ...
|
|
||||||
|
|
||||||
loaded: list
|
loaded: list
|
||||||
|
|
||||||
class AddonsHook:
|
|
||||||
def find_module(self, name: str, path: Any | None = ...) -> AddonsHook | None: ...
|
|
||||||
def load_module(self, name: str) -> ModuleType | None: ...
|
|
||||||
|
|
||||||
class OdooHook:
|
|
||||||
def find_module(self, name: str, path: Any | None = ...) -> OdooHook | None: ...
|
|
||||||
def load_module(self, name: str) -> ModuleType | None: ...
|
|
||||||
|
|
||||||
class UpgradeHook:
|
class UpgradeHook:
|
||||||
def find_module(self, name: str, path: Any | None = ...) -> UpgradeHook | None: ...
|
def find_module(self, name: str, path: Any | None = ...) -> UpgradeHook | None: ...
|
||||||
def load_module(self, name: str) -> ModuleType | None: ...
|
def load_module(self, name: str) -> ModuleType | None: ...
|
||||||
|
|||||||
@@ -45,7 +45,5 @@ class expression:
|
|||||||
result: tuple[str, list]
|
result: tuple[str, list]
|
||||||
def __init__(self, domain: _Domain, model: BaseModel, alias: str | None = ..., query: Query | None = ...) -> None: ...
|
def __init__(self, domain: _Domain, model: BaseModel, alias: str | None = ..., query: Query | None = ...) -> None: ...
|
||||||
def _unaccent(self, field: Field) -> Callable[[Any], str]: ...
|
def _unaccent(self, field: Field) -> Callable[[Any], str]: ...
|
||||||
def get_tables(self) -> tuple[str, ...]: ...
|
|
||||||
def parse(self): ...
|
def parse(self): ...
|
||||||
def __leaf_to_sql(self, leaf, model: BaseModel, alias: str) -> tuple[str, list]: ...
|
def __leaf_to_sql(self, leaf, model: BaseModel, alias: str) -> tuple[str, list]: ...
|
||||||
def to_sql(self) -> tuple[str, list]: ...
|
|
||||||
|
|||||||
@@ -1,7 +1 @@
|
|||||||
from ..exceptions import except_orm
|
def __getattr__(name): ...
|
||||||
from ..models import AbstractModel, Model, TransientModel
|
|
||||||
|
|
||||||
except_osv = except_orm
|
|
||||||
osv = Model
|
|
||||||
osv_memory = TransientModel
|
|
||||||
osv_abstract = AbstractModel
|
|
||||||
@@ -129,10 +129,6 @@ class TransactionCase(BaseCase):
|
|||||||
_savepoint_id: int
|
_savepoint_id: int
|
||||||
def setUp(self): ...
|
def setUp(self): ...
|
||||||
|
|
||||||
class SavepointCase(TransactionCase):
|
|
||||||
@classmethod
|
|
||||||
def __init_subclass__(cls) -> None: ...
|
|
||||||
|
|
||||||
class SingleTransactionCase(BaseCase):
|
class SingleTransactionCase(BaseCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def __init_subclass__(cls) -> None: ...
|
def __init_subclass__(cls) -> None: ...
|
||||||
@@ -244,10 +240,6 @@ class HttpCase(TransactionCase):
|
|||||||
def start_tour(self, url_path: str, tour_name: str, step_delay: float | None = ..., **kwargs) -> None: ...
|
def start_tour(self, url_path: str, tour_name: str, step_delay: float | None = ..., **kwargs) -> None: ...
|
||||||
def profile(self, **kwargs) -> profiler.Nested: ...
|
def profile(self, **kwargs) -> profiler.Nested: ...
|
||||||
|
|
||||||
class HttpSavepointCase(HttpCase):
|
|
||||||
@classmethod
|
|
||||||
def __init_subclass__(cls) -> None: ...
|
|
||||||
|
|
||||||
def no_retry(arg: _T) -> _T: ...
|
def no_retry(arg: _T) -> _T: ...
|
||||||
def users(*logins: str) -> Callable[[_CallableT], _CallableT]: ...
|
def users(*logins: str) -> Callable[[_CallableT], _CallableT]: ...
|
||||||
def warmup(func: _CallableT, *args, **kwargs) -> _CallableT: ...
|
def warmup(func: _CallableT, *args, **kwargs) -> _CallableT: ...
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ class xml_import:
|
|||||||
def make_xml_id(self, xml_id: str) -> str: ...
|
def make_xml_id(self, xml_id: str) -> str: ...
|
||||||
def _test_xml_id(self, xml_id: str) -> None: ...
|
def _test_xml_id(self, xml_id: str) -> None: ...
|
||||||
def _tag_delete(self, rec: _Element) -> None: ...
|
def _tag_delete(self, rec: _Element) -> None: ...
|
||||||
def _tag_report(self, rec: _Element): ...
|
|
||||||
def _tag_function(self, rec: _Element) -> None: ...
|
def _tag_function(self, rec: _Element) -> None: ...
|
||||||
def _tag_act_window(self, rec: _Element) -> None: ...
|
|
||||||
def _tag_menuitem(self, rec: _Element, parent: Any | None = ...) -> None: ...
|
def _tag_menuitem(self, rec: _Element, parent: Any | None = ...) -> None: ...
|
||||||
def _tag_record(self, rec: _Element, extra_vals: dict | None = ...) -> tuple[str, int] | None: ...
|
def _tag_record(self, rec: _Element, extra_vals: dict | None = ...) -> tuple[str, int] | None: ...
|
||||||
def _tag_template(self, el: _Element) -> tuple[str, int] | None: ...
|
def _tag_template(self, el: _Element) -> tuple[str, int] | None: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user