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:
@@ -181,6 +181,8 @@ class Request:
|
|||||||
_cr: Cursor
|
_cr: Cursor
|
||||||
@property
|
@property
|
||||||
def geoip(self) -> dict[str, Any]: ...
|
def geoip(self) -> dict[str, Any]: ...
|
||||||
|
@property
|
||||||
|
def best_lang(self) -> str | None: ...
|
||||||
def csrf_token(self, time_limit: int | None = ...) -> str: ...
|
def csrf_token(self, time_limit: int | None = ...) -> str: ...
|
||||||
def validate_csrf(self, csrf: str) -> bool: ...
|
def validate_csrf(self, csrf: str) -> bool: ...
|
||||||
def default_context(self) -> dict: ...
|
def default_context(self) -> dict: ...
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ regex_private: Pattern[str]
|
|||||||
|
|
||||||
def check_method_name(name: str) -> None: ...
|
def check_method_name(name: str) -> None: ...
|
||||||
def fix_import_export_id_paths(fieldname: str) -> list[str]: ...
|
def fix_import_export_id_paths(fieldname: str) -> list[str]: ...
|
||||||
def merge_trigger_trees(trees: list, select: Callable[[Any], bool] = ...) -> dict: ...
|
|
||||||
|
|
||||||
class MetaModel(api.Meta):
|
class MetaModel(api.Meta):
|
||||||
module_to_models: defaultdict[str, list[type[BaseModel]]]
|
module_to_models: defaultdict[str, list[type[BaseModel]]]
|
||||||
@@ -309,8 +308,6 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _recompute_model(self, fnames: Iterable[str] | None = ...) -> None: ...
|
def _recompute_model(self, fnames: Iterable[str] | None = ...) -> None: ...
|
||||||
def _recompute_recordset(self, fnames: Iterable[str] | None = ...) -> None: ...
|
def _recompute_recordset(self, fnames: Iterable[str] | None = ...) -> None: ...
|
||||||
def _recompute_field(self, field: Field, ids: Iterable[int] | None = ...) -> None: ...
|
def _recompute_field(self, field: Field, ids: Iterable[int] | None = ...) -> None: ...
|
||||||
@classmethod
|
|
||||||
def _dependent_fields(cls, field: Field) -> Iterator[Field]: ...
|
|
||||||
def _has_onchange(self, field: Field, other_fields: Container[Field]) -> bool: ...
|
def _has_onchange(self, field: Field, other_fields: Container[Field]) -> bool: ...
|
||||||
def _onchange_eval(self, field_name: str, onchange: str, result: dict) -> None: ...
|
def _onchange_eval(self, field_name: str, onchange: str, result: dict) -> None: ...
|
||||||
def onchange(self, values: dict[str, Any], field_name: str | list[str] | bool, field_onchange: dict[str, str]) -> dict: ...
|
def onchange(self, values: dict[str, Any], field_name: str | list[str] | bool, field_onchange: dict[str, str]) -> dict: ...
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from ..models import BaseModel
|
|||||||
from ..fields import Field
|
from ..fields import Field
|
||||||
from ..sql_db import Connection, Cursor
|
from ..sql_db import Connection, Cursor
|
||||||
from ..tests.runner import OdooTestResult
|
from ..tests.runner import OdooTestResult
|
||||||
from ..tools import Collector, ignore as ignore
|
from ..tools import Collector
|
||||||
from ..tools.lru import LRU
|
from ..tools.lru import LRU
|
||||||
|
|
||||||
class Registry(Mapping[str, type[BaseModel]]):
|
class Registry(Mapping[str, type[BaseModel]]):
|
||||||
@@ -39,6 +39,8 @@ class Registry(Mapping[str, type[BaseModel]]):
|
|||||||
field_depends: Collector
|
field_depends: Collector
|
||||||
field_depends_context: Collector
|
field_depends_context: Collector
|
||||||
field_inverses: Collector
|
field_inverses: Collector
|
||||||
|
_field_trigger_trees: dict[Field, TriggerTree]
|
||||||
|
_is_modifying_relations: dict[Field, bool]
|
||||||
registry_sequence: int | None
|
registry_sequence: int | None
|
||||||
cache_sequence: int | None
|
cache_sequence: int | None
|
||||||
_invalidation_flags: threading.local
|
_invalidation_flags: threading.local
|
||||||
@@ -62,10 +64,13 @@ class Registry(Mapping[str, type[BaseModel]]):
|
|||||||
def setup_models(self, cr: Cursor) -> None: ...
|
def setup_models(self, cr: Cursor) -> None: ...
|
||||||
@property
|
@property
|
||||||
def field_computed(self) -> dict[Field, list[Field]]: ...
|
def field_computed(self) -> dict[Field, list[Field]]: ...
|
||||||
|
def get_trigger_tree(self, fields: list, select: Callable = ...) -> TriggerTree: ...
|
||||||
|
def get_dependent_fields(self, field: Field) -> Iterator[Field]: ...
|
||||||
|
def _discard_fields(self, fields: list[Field]) -> None: ...
|
||||||
|
def get_field_trigger_tree(self, field: Field) -> TriggerTree: ...
|
||||||
@property
|
@property
|
||||||
def field_triggers(self) -> dict[Field, Any]: ...
|
def _field_triggers(self) -> defaultdict[Field, Any]: ...
|
||||||
@property
|
def is_modifying_relations(self, field: Field) -> bool: ...
|
||||||
def fields_modifying_relations(self) -> set[Field]: ...
|
|
||||||
def post_init(self, func: Callable, *args, **kwargs) -> None: ...
|
def post_init(self, func: Callable, *args, **kwargs) -> None: ...
|
||||||
def post_constraint(self, func: Callable, *args, **kwargs) -> None: ...
|
def post_constraint(self, func: Callable, *args, **kwargs) -> None: ...
|
||||||
def finalize_constraints(self) -> None: ...
|
def finalize_constraints(self) -> None: ...
|
||||||
@@ -103,3 +108,13 @@ class DummyRLock:
|
|||||||
def release(self) -> None: ...
|
def release(self) -> None: ...
|
||||||
def __enter__(self) -> None: ...
|
def __enter__(self) -> None: ...
|
||||||
def __exit__(self, type, value, traceback) -> None: ...
|
def __exit__(self, type, value, traceback) -> None: ...
|
||||||
|
|
||||||
|
class TriggerTree(dict):
|
||||||
|
__slots__ = ['root']
|
||||||
|
root: Any
|
||||||
|
def __init__(self, root: Any = ..., *args, **kwargs) -> None: ...
|
||||||
|
def __bool__(self) -> bool: ...
|
||||||
|
def increase(self, key) -> TriggerTree: ...
|
||||||
|
def depth_first(self) -> Iterator[TriggerTree]: ...
|
||||||
|
@classmethod
|
||||||
|
def merge(cls, trees: list[TriggerTree], select: Callable = ...) -> TriggerTree: ...
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from email.message import Message
|
from email.message import Message
|
||||||
from re import Pattern
|
from re import Pattern
|
||||||
from typing import Collection, FrozenSet, Literal
|
from typing import Callable, Collection, FrozenSet, Literal
|
||||||
|
|
||||||
from lxml.etree import _Element
|
from lxml.etree import _Element
|
||||||
from lxml.html import clean
|
from lxml.html import clean
|
||||||
@@ -15,10 +15,11 @@ class _Cleaner(clean.Cleaner):
|
|||||||
strip_classes: bool
|
strip_classes: bool
|
||||||
sanitize_style: bool
|
sanitize_style: bool
|
||||||
def __call__(self, doc: _Element) -> None: ...
|
def __call__(self, doc: _Element) -> None: ...
|
||||||
def tag_quote(self, el: _Element) -> None: ...
|
|
||||||
def strip_class(self, el: _Element) -> None: ...
|
def strip_class(self, el: _Element) -> None: ...
|
||||||
def parse_style(self, el: _Element) -> None: ...
|
def parse_style(self, el: _Element) -> None: ...
|
||||||
|
|
||||||
|
def tag_quote(el: _Element) -> None: ...
|
||||||
|
def html_normalize(src: str, filter_callback: Callable[[_Element], _Element] | None = ...) -> str: ...
|
||||||
def html_sanitize(src: str, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ...,
|
def html_sanitize(src: str, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ...,
|
||||||
sanitize_form: bool = ..., strip_style: bool = ..., strip_classes: bool = ...) -> Markup: ...
|
sanitize_form: bool = ..., strip_style: bool = ..., strip_classes: bool = ...) -> Markup: ...
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user