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:
@@ -61,10 +61,8 @@ class Environment(Mapping[str, BaseModel]):
|
||||
uid: int = ...
|
||||
context: dict[str, Any] = ...
|
||||
su: bool = ...
|
||||
args: tuple[Cursor, int, dict, bool]
|
||||
def reset(self) -> None: ...
|
||||
uid_origin: int | None
|
||||
all: Transaction
|
||||
transaction: Transaction
|
||||
registry: Registry
|
||||
cache: Cache
|
||||
|
||||
@@ -121,9 +121,9 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
|
||||
def create(self, record_values: list[tuple[BaseModel, Any]]) -> None: ...
|
||||
def write(self, records: _ModelT, value) -> None: ...
|
||||
@overload
|
||||
def __get__(self, record: BaseModel, owner) -> _FieldValueT: ...
|
||||
def __get__(self, record: BaseModel, owner: Any | None = ...) -> _FieldValueT: ...
|
||||
@overload
|
||||
def __get__(self: _FieldT, records: None, owner) -> _FieldT: ...
|
||||
def __get__(self: _FieldT, records: None, owner: Any | None = ...) -> _FieldT: ...
|
||||
def mapped(self, records: BaseModel): ...
|
||||
def __set__(self, records: BaseModel, value): ...
|
||||
def recompute(self, records: BaseModel) -> None: ...
|
||||
|
||||
@@ -75,11 +75,12 @@ class Stream:
|
||||
max_age: int | None
|
||||
immutable: bool
|
||||
size: int | None
|
||||
public: bool
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def from_path(cls, path: str, filter_ext: tuple[str, ...] = ...) -> Stream: ...
|
||||
@classmethod
|
||||
def from_attachment(cls, attachment) -> Stream: ...
|
||||
def from_path(
|
||||
cls, path: str, filter_ext: tuple[str, ...] = ..., public: bool = ...
|
||||
) -> Stream: ...
|
||||
@classmethod
|
||||
def from_binary_field(cls, record: BaseModel, field_name: str) -> Stream: ...
|
||||
def read(self) -> bytes: ...
|
||||
@@ -115,7 +116,6 @@ class FilesystemSessionStore(sessions.FilesystemSessionStore):
|
||||
class Session(MutableMapping):
|
||||
can_save: bool
|
||||
is_dirty: bool
|
||||
is_explicit: bool
|
||||
is_new: bool
|
||||
should_rotate: bool
|
||||
sid: str
|
||||
|
||||
@@ -314,13 +314,17 @@ class BaseModel(metaclass=MetaModel):
|
||||
self, fields: Collection[str] | None = ..., load: str = ...
|
||||
) -> list[dict[str, Any]]: ...
|
||||
def update_field_translations(
|
||||
self, field_name: str, translations: dict[str, Any]
|
||||
self,
|
||||
field_name: str,
|
||||
translations: dict[str, Any],
|
||||
source_lang: str | None = ...,
|
||||
) -> bool: ...
|
||||
def _update_field_translations(
|
||||
self,
|
||||
field_name: str,
|
||||
translations: dict[str, Any],
|
||||
digest: Callable | None = ...,
|
||||
source_lang: str | None = ...,
|
||||
) -> bool: ...
|
||||
def get_field_translations(
|
||||
self, field_name: str, langs: list[str] | None = ...
|
||||
|
||||
@@ -31,9 +31,9 @@ def domain_combine_anies(domain: list, model: BaseModel) -> list: ...
|
||||
def prettify_domain(domain: list, pre_indent: int = ...) -> str: ...
|
||||
def normalize_leaf(element): ...
|
||||
def is_operator(element) -> bool: ...
|
||||
def is_leaf(element, internal: bool = ...) -> bool: ...
|
||||
def is_leaf(element) -> bool: ...
|
||||
def is_boolean(element) -> bool: ...
|
||||
def check_leaf(element, internal: bool = ...) -> None: ...
|
||||
def check_leaf(element) -> None: ...
|
||||
def get_unaccent_wrapper(cr: Cursor) -> Callable[[Any], str]: ...
|
||||
|
||||
class expression:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import datetime
|
||||
from typing import Iterator, Tuple, TypeVar
|
||||
|
||||
import babel
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
_DateTimeT = TypeVar("_DateTimeT", datetime.date, datetime.datetime)
|
||||
@@ -21,3 +22,4 @@ def json_default(obj) -> str: ...
|
||||
def date_range(
|
||||
start: datetime.datetime, end: datetime.datetime, step: relativedelta = ...
|
||||
) -> Iterator[datetime.datetime]: ...
|
||||
def weeknumber(locale: babel.Locale, date: datetime.date) -> Tuple[int, int]: ...
|
||||
|
||||
@@ -22,3 +22,4 @@ def float_split(value: float, precision_digits: int) -> tuple[int, int]: ...
|
||||
def json_float_round(
|
||||
value: float, precision_digits: int, rounding_method: str = ...
|
||||
) -> float: ...
|
||||
def float_invert(value: float) -> float: ...
|
||||
|
||||
@@ -26,6 +26,7 @@ def add_banner(
|
||||
logo: bool = ...,
|
||||
thickness: float = ...,
|
||||
) -> BytesIO: ...
|
||||
def reshape_text(text: str) -> str: ...
|
||||
|
||||
class OdooPdfFileReader(PdfFileReader):
|
||||
def getAttachments(self) -> Iterable[tuple[Any, Any]]: ...
|
||||
|
||||
@@ -45,7 +45,6 @@ class PeriodicCollector(Collector):
|
||||
name: str
|
||||
active: bool
|
||||
frame_interval: float
|
||||
thread: Thread
|
||||
last_frame: FrameType | None
|
||||
def __init__(self, interval: float = ...) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user