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:
@@ -50,7 +50,6 @@ def returns(
|
|||||||
model: str | None, downgrade: Callable | None = ..., upgrade: Callable | None = ...
|
model: str | None, downgrade: Callable | None = ..., upgrade: Callable | None = ...
|
||||||
) -> Callable[[_T], _T]: ...
|
) -> Callable[[_T], _T]: ...
|
||||||
def downgrade(method: Callable, value, self, args, kwargs): ...
|
def downgrade(method: Callable, value, self, args, kwargs): ...
|
||||||
def split_context(method: Callable, args, kwargs) -> tuple: ...
|
|
||||||
def autovacuum(method: _CallableT) -> _CallableT: ...
|
def autovacuum(method: _CallableT) -> _CallableT: ...
|
||||||
def model(method: _CallableT) -> _CallableT: ...
|
def model(method: _CallableT) -> _CallableT: ...
|
||||||
def model_create_single(method: _CallableT) -> _CallableT: ...
|
def model_create_single(method: _CallableT) -> _CallableT: ...
|
||||||
@@ -113,7 +112,6 @@ class Environment(Mapping[str, BaseModel]):
|
|||||||
def not_to_compute(self, field: Field, records: _ModelT) -> _ModelT: ...
|
def not_to_compute(self, field: Field, records: _ModelT) -> _ModelT: ...
|
||||||
def add_to_compute(self, field: Field, records: BaseModel): ...
|
def add_to_compute(self, field: Field, records: BaseModel): ...
|
||||||
def remove_to_compute(self, field: Field, records: BaseModel) -> None: ...
|
def remove_to_compute(self, field: Field, records: BaseModel) -> None: ...
|
||||||
def norecompute(self) -> Generator[None, None, None]: ...
|
|
||||||
def cache_key(self, field: Field): ...
|
def cache_key(self, field: Field): ...
|
||||||
|
|
||||||
class Transaction:
|
class Transaction:
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
|
|||||||
help: str | None
|
help: str | None
|
||||||
readonly: bool
|
readonly: bool
|
||||||
required: bool
|
required: bool
|
||||||
states: dict[str, list[tuple]] | None
|
|
||||||
groups: str | None
|
groups: str | None
|
||||||
change_default: bool
|
change_default: bool
|
||||||
related_field: Field | None
|
related_field: Field | None
|
||||||
@@ -205,7 +204,6 @@ class Monetary(Field[float]):
|
|||||||
|
|
||||||
class _String(Field[str]):
|
class _String(Field[str]):
|
||||||
translate: Callable | bool
|
translate: Callable | bool
|
||||||
unaccent: bool
|
|
||||||
def __init__(self, string: str = ..., **kwargs) -> None: ...
|
def __init__(self, string: str = ..., **kwargs) -> None: ...
|
||||||
def get_trans_terms(self, value) -> list: ...
|
def get_trans_terms(self, value) -> list: ...
|
||||||
def get_text_content(self, term): ...
|
def get_text_content(self, term): ...
|
||||||
@@ -433,7 +431,6 @@ class Properties(Field):
|
|||||||
column_type: tuple[str, str]
|
column_type: tuple[str, str]
|
||||||
copy: bool
|
copy: bool
|
||||||
prefetch: bool
|
prefetch: bool
|
||||||
unaccent: bool
|
|
||||||
write_sequence: int
|
write_sequence: int
|
||||||
store: bool
|
store: bool
|
||||||
readonly: bool
|
readonly: bool
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
orderby: str | None = ...,
|
orderby: str | None = ...,
|
||||||
lazy: bool = ...,
|
lazy: bool = ...,
|
||||||
) -> list[dict[str, Any]]: ...
|
) -> list[dict[str, Any]]: ...
|
||||||
def _inherits_join_calc(self, alias: str, fname: str, query: Query) -> str: ...
|
|
||||||
def _field_to_sql(
|
def _field_to_sql(
|
||||||
self, alias: str, fname: str, query: Query | None = ...
|
self, alias: str, fname: str, query: Query | None = ...
|
||||||
) -> SQL: ...
|
) -> SQL: ...
|
||||||
@@ -375,7 +374,6 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _order_field_to_sql(
|
def _order_field_to_sql(
|
||||||
self, alias: str, field_name: str, direction: SQL, nulls: SQL, query: Query
|
self, alias: str, field_name: str, direction: SQL, nulls: SQL, query: Query
|
||||||
) -> SQL: ...
|
) -> SQL: ...
|
||||||
def _generate_order_by(self, order_spec: str | None, query: Query) -> str: ...
|
|
||||||
def _flush_search(
|
def _flush_search(
|
||||||
self,
|
self,
|
||||||
domain: list,
|
domain: list,
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ def initialize_sys_path() -> None: ...
|
|||||||
def get_module_path(
|
def get_module_path(
|
||||||
module: str, downloaded: bool = ..., display_warning: bool = ...
|
module: str, downloaded: bool = ..., display_warning: bool = ...
|
||||||
) -> str | Literal[False]: ...
|
) -> str | Literal[False]: ...
|
||||||
def get_module_filetree(module: str, dir: str = ...) -> dict: ...
|
|
||||||
def get_resource_path(module: str, *args) -> str | Literal[False]: ...
|
def get_resource_path(module: str, *args) -> str | Literal[False]: ...
|
||||||
|
|
||||||
get_module_resource = get_resource_path
|
get_module_resource = get_resource_path
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ _SavepointT = TypeVar("_SavepointT", bound=Savepoint)
|
|||||||
|
|
||||||
def undecimalize(symb, cr: Cursor) -> float | None: ...
|
def undecimalize(symb, cr: Cursor) -> float | None: ...
|
||||||
|
|
||||||
|
DECIMAL_TO_FLOAT_TYPE: Any
|
||||||
real_time: Callable
|
real_time: Callable
|
||||||
re_from: Pattern
|
re_from: Pattern
|
||||||
re_into: Pattern
|
re_into: Pattern
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from ..tools import mute_logger, profiler
|
|||||||
from ..tools._vendor.sessions import Session
|
from ..tools._vendor.sessions import Session
|
||||||
from ..tools.profiler import Profiler
|
from ..tools.profiler import Profiler
|
||||||
from . import case
|
from . import case
|
||||||
|
from .form import Form as Form
|
||||||
from .result import OdooTestResult
|
from .result import OdooTestResult
|
||||||
|
|
||||||
_T = TypeVar("_T")
|
_T = TypeVar("_T")
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
from functools import wraps as wraps
|
||||||
from json import JSONEncoder as JSONEncoder
|
from json import JSONEncoder as JSONEncoder
|
||||||
from typing import Callable, Generic, TypeVar
|
from typing import Callable, Generic, TypeVar
|
||||||
|
|
||||||
@@ -22,7 +23,6 @@ def synchronized(lock_attr: str = ...) -> Callable[[_T], _T]: ...
|
|||||||
locked: Callable[[_T], _T]
|
locked: Callable[[_T], _T]
|
||||||
|
|
||||||
def frame_codeinfo(fframe, back: int = ...) -> tuple[str | None, str | None]: ...
|
def frame_codeinfo(fframe, back: int = ...) -> tuple[str | None, str | None]: ...
|
||||||
def compose(a: Callable[..., _T], b: Callable) -> Callable[..., _T]: ...
|
|
||||||
|
|
||||||
class _ClassProperty(property, Generic[_T]):
|
class _ClassProperty(property, Generic[_T]):
|
||||||
def __get__(self, cls, owner) -> _T: ...
|
def __get__(self, cls, owner) -> _T: ...
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from types import FrameType, ModuleType
|
|||||||
from typing import (
|
from typing import (
|
||||||
IO,
|
IO,
|
||||||
Any,
|
Any,
|
||||||
AnyStr,
|
|
||||||
Callable,
|
Callable,
|
||||||
Collection,
|
Collection,
|
||||||
Generic,
|
Generic,
|
||||||
@@ -45,15 +44,8 @@ SKIPPED_ELEMENT_TYPES: tuple
|
|||||||
NON_BREAKING_SPACE: str
|
NON_BREAKING_SPACE: str
|
||||||
|
|
||||||
def find_in_path(name: str) -> str: ...
|
def find_in_path(name: str) -> str: ...
|
||||||
def exec_command_pipe(
|
|
||||||
name: str, *args
|
|
||||||
) -> tuple[IO[AnyStr] | None, IO[AnyStr] | None]: ...
|
|
||||||
def find_pg_tool(name: str) -> str: ...
|
def find_pg_tool(name: str) -> str: ...
|
||||||
def exec_pg_environ() -> dict[str, str]: ...
|
def exec_pg_environ() -> dict[str, str]: ...
|
||||||
def exec_pg_command(name: str, *args) -> None: ...
|
|
||||||
def exec_pg_command_pipe(
|
|
||||||
name: str, *args
|
|
||||||
) -> tuple[IO[AnyStr] | None, IO[AnyStr] | None]: ...
|
|
||||||
def file_path(
|
def file_path(
|
||||||
file_path: str, filter_ext: tuple[str, ...] = ..., env: Environment | None = ...
|
file_path: str, filter_ext: tuple[str, ...] = ..., env: Environment | None = ...
|
||||||
) -> str: ...
|
) -> str: ...
|
||||||
@@ -78,20 +70,11 @@ class PatchedWorkbook(xlwt.Workbook):
|
|||||||
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
|
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
|
||||||
def add_worksheet(self, name: str | None = ..., **kw) -> Worksheet: ...
|
def add_worksheet(self, name: str | None = ..., **kw) -> Worksheet: ...
|
||||||
|
|
||||||
def to_xml(s: str) -> str: ...
|
|
||||||
def get_iso_codes(lang: str) -> str: ...
|
def get_iso_codes(lang: str) -> str: ...
|
||||||
def scan_languages() -> list[tuple[str, str]]: ...
|
def scan_languages() -> list[tuple[str, str]]: ...
|
||||||
def mod10r(number: str) -> str: ...
|
def mod10r(number: str) -> str: ...
|
||||||
def str2bool(s: str, default: Any | None = ...) -> bool: ...
|
def str2bool(s: str, default: Any | None = ...) -> bool: ...
|
||||||
def human_size(sz) -> str: ...
|
def human_size(sz) -> str: ...
|
||||||
def logged(f: _CallableT) -> _CallableT: ...
|
|
||||||
|
|
||||||
class profile:
|
|
||||||
fname: str | None
|
|
||||||
def __init__(self, fname: str | None = ...) -> None: ...
|
|
||||||
def __call__(self, f: _CallableT) -> _CallableT: ...
|
|
||||||
|
|
||||||
def detect_ip_addr() -> str: ...
|
|
||||||
|
|
||||||
DEFAULT_SERVER_DATE_FORMAT: str
|
DEFAULT_SERVER_DATE_FORMAT: str
|
||||||
DEFAULT_SERVER_TIME_FORMAT: str
|
DEFAULT_SERVER_TIME_FORMAT: str
|
||||||
@@ -105,10 +88,6 @@ def split_every(
|
|||||||
n: int, iterable: Iterable[_T], piece_maker: Callable[[Iterable[_T]], _T1] = ...
|
n: int, iterable: Iterable[_T], piece_maker: Callable[[Iterable[_T]], _T1] = ...
|
||||||
) -> Iterator[_T1]: ...
|
) -> Iterator[_T1]: ...
|
||||||
|
|
||||||
raise_error: object
|
|
||||||
|
|
||||||
def resolve_attr(obj, attr: str, default: object = ...): ...
|
|
||||||
def attrgetter(*items): ...
|
|
||||||
def discardattr(obj, key: str) -> None: ...
|
def discardattr(obj, key: str) -> None: ...
|
||||||
def remove_accents(input_str: str) -> str: ...
|
def remove_accents(input_str: str) -> str: ...
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
from re import Pattern
|
from re import Pattern
|
||||||
from typing import BinaryIO, Callable, Iterable
|
from typing import BinaryIO, Callable
|
||||||
|
|
||||||
WINDOWS_RESERVED: Pattern
|
WINDOWS_RESERVED: Pattern
|
||||||
|
|
||||||
def clean_filename(name: str, replacement: str = ...) -> str: ...
|
def clean_filename(name: str, replacement: str = ...) -> str: ...
|
||||||
def listdir(dir: str, recursive: bool = ...) -> Iterable[str]: ...
|
|
||||||
def zip_dir(
|
def zip_dir(
|
||||||
path: str,
|
path: str,
|
||||||
stream: str | BinaryIO,
|
stream: str | BinaryIO,
|
||||||
|
|||||||
Reference in New Issue
Block a user