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:
@@ -166,6 +166,8 @@ class Cache:
|
|||||||
check_dirty: bool = ...,
|
check_dirty: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def insert_missing(self, records: BaseModel, field: Field, values) -> None: ...
|
def insert_missing(self, records: BaseModel, field: Field, values) -> None: ...
|
||||||
|
def patch(self, records: BaseModel, field: Field, new_id) -> None: ...
|
||||||
|
def patch_and_set(self, record: BaseModel, field: Field, value): ...
|
||||||
def remove(self, record: BaseModel, field: Field) -> None: ...
|
def remove(self, record: BaseModel, field: Field) -> None: ...
|
||||||
def get_values(self, records: BaseModel, field: Field) -> Iterator: ...
|
def get_values(self, records: BaseModel, field: Field) -> Iterator: ...
|
||||||
def get_until_miss(self, records: BaseModel, field: Field) -> list: ...
|
def get_until_miss(self, records: BaseModel, field: Field) -> list: ...
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
|
|||||||
groups: str | None
|
groups: str | None
|
||||||
change_default: bool
|
change_default: bool
|
||||||
related_field: Field | None
|
related_field: Field | None
|
||||||
group_operator: str | None
|
aggregator: str | None
|
||||||
group_expand: str | None
|
group_expand: str | None
|
||||||
prefetch: bool
|
prefetch: bool
|
||||||
default_export_compatible: bool
|
default_export_compatible: bool
|
||||||
@@ -92,8 +92,6 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
|
|||||||
def traverse_related(self, record: _ModelT) -> tuple[_ModelT, Field]: ...
|
def traverse_related(self, record: _ModelT) -> tuple[_ModelT, Field]: ...
|
||||||
@property
|
@property
|
||||||
def base_field(self) -> Field: ...
|
def base_field(self) -> Field: ...
|
||||||
@property
|
|
||||||
def groupable(self) -> bool: ...
|
|
||||||
def resolve_depends(self, registry: Registry) -> Iterator[tuple]: ...
|
def resolve_depends(self, registry: Registry) -> Iterator[tuple]: ...
|
||||||
def get_description(
|
def get_description(
|
||||||
self, env: Environment, attributes: Container[str] | None = ...
|
self, env: Environment, attributes: Container[str] | None = ...
|
||||||
@@ -146,7 +144,7 @@ class Boolean(Field[bool]):
|
|||||||
class Integer(Field[int]):
|
class Integer(Field[int]):
|
||||||
type: str
|
type: str
|
||||||
column_type: tuple[str, str]
|
column_type: tuple[str, str]
|
||||||
group_operator: str
|
aggregator: str
|
||||||
def convert_to_column(
|
def convert_to_column(
|
||||||
self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...
|
self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...
|
||||||
) -> int: ...
|
) -> int: ...
|
||||||
@@ -161,7 +159,7 @@ class Integer(Field[int]):
|
|||||||
|
|
||||||
class Float(Field[float]):
|
class Float(Field[float]):
|
||||||
type: str
|
type: str
|
||||||
group_operator: str
|
aggregator: str
|
||||||
def __init__(
|
def __init__(
|
||||||
self, string: str = ..., digits: tuple[int, int] | str | None = ..., **kwargs
|
self, string: str = ..., digits: tuple[int, int] | str | None = ..., **kwargs
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@@ -185,7 +183,7 @@ class Monetary(Field[float]):
|
|||||||
write_sequence: int
|
write_sequence: int
|
||||||
column_type: tuple[str, str]
|
column_type: tuple[str, str]
|
||||||
currency_field: str | None
|
currency_field: str | None
|
||||||
group_operator: str
|
aggregator: str
|
||||||
def __init__(
|
def __init__(
|
||||||
self, string: str = ..., currency_field: str = ..., **kwargs
|
self, string: str = ..., currency_field: str = ..., **kwargs
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@@ -414,7 +412,7 @@ class Many2one(_Relational):
|
|||||||
class Many2oneReference(Integer):
|
class Many2oneReference(Integer):
|
||||||
type: str
|
type: str
|
||||||
model_field: str | None
|
model_field: str | None
|
||||||
group_operator: str | None
|
aggregator: str | None
|
||||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||||
|
|
||||||
class Json(Field):
|
class Json(Field):
|
||||||
@@ -549,8 +547,6 @@ class Many2many(_RelationalMulti):
|
|||||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||||
def update_db(self, model: BaseModel, columns) -> None: ...
|
def update_db(self, model: BaseModel, columns) -> None: ...
|
||||||
def update_db_foreign_keys(self, model: BaseModel) -> None: ...
|
def update_db_foreign_keys(self, model: BaseModel) -> None: ...
|
||||||
@property
|
|
||||||
def groupable(self) -> bool: ...
|
|
||||||
def read(self, records: BaseModel) -> None: ...
|
def read(self, records: BaseModel) -> None: ...
|
||||||
def write_real(self, records_commands_list: list, create: bool = ...) -> None: ...
|
def write_real(self, records_commands_list: list, create: bool = ...) -> None: ...
|
||||||
def write_new(self, records_commands_list: list) -> None: ...
|
def write_new(self, records_commands_list: list) -> None: ...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from collections.abc import MutableMapping
|
from collections.abc import MutableMapping
|
||||||
from typing import Any, Callable, Iterable, Literal, Mapping, TypeVar
|
from typing import Any, Callable, Generator, Iterable, Literal, Mapping, TypeVar
|
||||||
|
|
||||||
import geoip2.database
|
import geoip2.database
|
||||||
import geoip2.models
|
import geoip2.models
|
||||||
@@ -151,6 +151,16 @@ class GeoIP(Mapping):
|
|||||||
|
|
||||||
request: Request
|
request: Request
|
||||||
|
|
||||||
|
def borrow_request() -> Generator[Request, None, None]: ...
|
||||||
|
def make_request_wrap_methods(attr) -> tuple[Callable, Callable]: ...
|
||||||
|
|
||||||
|
class HTTPRequest:
|
||||||
|
environ: dict
|
||||||
|
def __init__(self, environ: dict) -> None: ...
|
||||||
|
def __enter__(self) -> HTTPRequest: ...
|
||||||
|
|
||||||
|
HTTPREQUEST_ATTRIBUTES: list[str]
|
||||||
|
|
||||||
class Response(werkzeug.Response):
|
class Response(werkzeug.Response):
|
||||||
default_mimetype: str
|
default_mimetype: str
|
||||||
def __init__(self, *args, **kw) -> None: ...
|
def __init__(self, *args, **kw) -> None: ...
|
||||||
|
|||||||
@@ -276,11 +276,14 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
orderby: str | None = ...,
|
orderby: str | None = ...,
|
||||||
lazy: bool = ...,
|
lazy: bool = ...,
|
||||||
) -> list[dict[str, Any]]: ...
|
) -> list[dict[str, Any]]: ...
|
||||||
|
def _traverse_related_sql(
|
||||||
|
self: _ModelT, alias: str, field: Field, query: Query
|
||||||
|
) -> tuple[_ModelT, Field, str]: ...
|
||||||
def _field_to_sql(
|
def _field_to_sql(
|
||||||
self, alias: str, fname: str, query: Query | None = ..., flush: bool = ...
|
self, alias: str, fname: str, query: Query | None = ..., flush: bool = ...
|
||||||
) -> SQL: ...
|
) -> SQL: ...
|
||||||
def _field_properties_to_sql(
|
def _read_group_groupby_properties(
|
||||||
self, alias: str, fname: str, property_name: str, query: Query
|
self, fname: str, property_name: str, query: Query
|
||||||
) -> SQL: ...
|
) -> SQL: ...
|
||||||
def _condition_to_sql(
|
def _condition_to_sql(
|
||||||
self, alias: str, fname: str, operator: str, value, query: Query
|
self, alias: str, fname: str, operator: str, value, query: Query
|
||||||
@@ -394,7 +397,6 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
self: _ModelT, new: _ModelT, excluded: Container[str] = ...
|
self: _ModelT, new: _ModelT, excluded: Container[str] = ...
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def copy(self: _ModelT, default: dict[str, Any] | None = ...) -> _ModelT: ...
|
def copy(self: _ModelT, default: dict[str, Any] | None = ...) -> _ModelT: ...
|
||||||
def copy_multi(self: _ModelT, default: dict[str, Any] | None = ...) -> _ModelT: ...
|
|
||||||
def exists(self: _ModelT) -> _ModelT: ...
|
def exists(self: _ModelT) -> _ModelT: ...
|
||||||
def _check_recursion(self, parent: str | None = ...) -> bool: ...
|
def _check_recursion(self, parent: str | None = ...) -> bool: ...
|
||||||
def _check_m2m_recursion(self, field_name: str) -> bool: ...
|
def _check_m2m_recursion(self, field_name: str) -> bool: ...
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ class ChromeBrowser:
|
|||||||
test_case: HttpCase,
|
test_case: HttpCase,
|
||||||
success_signal: Callable[[str], bool],
|
success_signal: Callable[[str], bool],
|
||||||
headless: bool = ...,
|
headless: bool = ...,
|
||||||
|
debug: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@property
|
@property
|
||||||
def screencasts_frames_dir(self) -> str: ...
|
def screencasts_frames_dir(self) -> str: ...
|
||||||
@@ -222,6 +223,7 @@ class HttpCase(TransactionCase):
|
|||||||
error_checker: Any | None = ...,
|
error_checker: Any | None = ...,
|
||||||
watch: bool = ...,
|
watch: bool = ...,
|
||||||
success_signal: Callable[[str], bool] | None = ...,
|
success_signal: Callable[[str], bool] | None = ...,
|
||||||
|
debug: bool = ...,
|
||||||
**kw
|
**kw
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ def relative_path_to_module_path(url: str, path_rel: str) -> str: ...
|
|||||||
|
|
||||||
ODOO_MODULE_RE: Pattern
|
ODOO_MODULE_RE: Pattern
|
||||||
|
|
||||||
def is_odoo_module(content: str) -> str: ...
|
def is_odoo_module(url: str, content: str) -> str: ...
|
||||||
def get_aliased_odoo_define_content(module_path: str, content: str) -> str: ...
|
def get_aliased_odoo_define_content(module_path: str, content: str) -> str: ...
|
||||||
def convert_as(val: str) -> list[str] | str: ...
|
def convert_as(val: str) -> list[str] | str: ...
|
||||||
def remove_as(val: str) -> list[str] | str: ...
|
def remove_as(val: str) -> list[str] | str: ...
|
||||||
|
|||||||
@@ -283,6 +283,14 @@ def get_diff(
|
|||||||
dark_color_scheme: bool = ...,
|
dark_color_scheme: bool = ...,
|
||||||
) -> str: ...
|
) -> str: ...
|
||||||
def hmac(env: Environment, scope, message, hash_function=...) -> str: ...
|
def hmac(env: Environment, scope, message, hash_function=...) -> str: ...
|
||||||
|
def hash_sign(
|
||||||
|
env: Environment,
|
||||||
|
scope,
|
||||||
|
message_values,
|
||||||
|
expiration: Any | None = ...,
|
||||||
|
expiration_hours: int | None = ...,
|
||||||
|
) -> str: ...
|
||||||
|
def verify_hash_signed(env: Environment, scope, payload): ...
|
||||||
|
|
||||||
ADDRESS_REGEX: Pattern
|
ADDRESS_REGEX: Pattern
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ def translate_xml_node(
|
|||||||
) -> _Element: ...
|
) -> _Element: ...
|
||||||
def parse_xml(text: str) -> _Element: ...
|
def parse_xml(text: str) -> _Element: ...
|
||||||
def serialize_xml(node: _Element) -> str: ...
|
def serialize_xml(node: _Element) -> str: ...
|
||||||
|
|
||||||
|
MODIFIER_ATTRS: set[str]
|
||||||
|
|
||||||
|
def xml_term_adapter(term_en: str) -> Callable[[str], str]: ...
|
||||||
def parse_html(text: str) -> _Element: ...
|
def parse_html(text: str) -> _Element: ...
|
||||||
def serialize_html(node: _Element) -> str: ...
|
def serialize_html(node: _Element) -> str: ...
|
||||||
def xml_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
def xml_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
||||||
@@ -42,6 +46,7 @@ def xml_term_converter(value: str) -> str: ...
|
|||||||
def html_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
def html_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
||||||
def html_term_converter(value: str) -> str: ...
|
def html_term_converter(value: str) -> str: ...
|
||||||
def get_text_content(term: str) -> str: ...
|
def get_text_content(term: str) -> str: ...
|
||||||
|
def is_text(term: str) -> bool: ...
|
||||||
def translate_sql_constraint(cr: Cursor, key: str, lang: str) -> str: ...
|
def translate_sql_constraint(cr: Cursor, key: str, lang: str) -> str: ...
|
||||||
|
|
||||||
class GettextAlias:
|
class GettextAlias:
|
||||||
|
|||||||
Reference in New Issue
Block a user