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:
@@ -37,6 +37,7 @@ regex_field_agg: Pattern[str]
|
||||
regex_read_group_spec: Pattern[str]
|
||||
AUTOINIT_RECALCULATE_STORED_FIELDS: int
|
||||
INSERT_BATCH_SIZE: int
|
||||
UPDATE_BATCH_SIZE: int
|
||||
SQL_DEFAULT: psycopg2.extensions.AsIs
|
||||
|
||||
def parse_read_group_spec(spec: str) -> tuple: ...
|
||||
@@ -196,7 +197,6 @@ class BaseModel(metaclass=MetaModel):
|
||||
order: str | None = ...,
|
||||
) -> _ModelT: ...
|
||||
def _compute_display_name(self) -> None: ...
|
||||
def name_get(self) -> list[tuple[int, str]]: ...
|
||||
def name_create(self, name: str) -> tuple[int, str]: ...
|
||||
def name_search(
|
||||
self,
|
||||
@@ -348,6 +348,7 @@ class BaseModel(metaclass=MetaModel):
|
||||
def unlink(self): ...
|
||||
def write(self, vals: dict[str, Any]): ...
|
||||
def _write(self, vals: dict[str, Any]) -> None: ...
|
||||
def _write_multi(self, vals_list) -> None: ...
|
||||
@overload
|
||||
def create(self: _ModelT, vals_list: list[dict[str, Any]]) -> _ModelT: ...
|
||||
@overload
|
||||
@@ -359,7 +360,7 @@ class BaseModel(metaclass=MetaModel):
|
||||
def _create(self: _ModelT, data_list: list[dict[str, Any]]) -> _ModelT: ...
|
||||
def _compute_field_value(self, field: Field) -> None: ...
|
||||
def _parent_store_create(self) -> None: ...
|
||||
def _parent_store_update_prepare(self: _ModelT, vals: dict) -> _ModelT: ...
|
||||
def _parent_store_update_prepare(self: _ModelT, vals_list) -> _ModelT: ...
|
||||
def _parent_store_update(self) -> None: ...
|
||||
def _load_records_write(self, values: dict[str, Any]) -> None: ...
|
||||
def _load_records_create(self, values: list[dict[str, Any]]): ...
|
||||
|
||||
@@ -137,6 +137,7 @@ def save_test_file(
|
||||
extension: str = ...,
|
||||
logger=...,
|
||||
document_type: str = ...,
|
||||
date_format: str = ...,
|
||||
) -> None: ...
|
||||
|
||||
class ChromeBrowser:
|
||||
|
||||
@@ -19,6 +19,7 @@ from .mail import *
|
||||
from .misc import *
|
||||
from .query import Query as Query
|
||||
from .query import _generate_table_alias as _generate_table_alias
|
||||
from .set_expression import SetDefinitions as SetDefinitions
|
||||
from .sourcemap_generator import SourceMapGenerator as SourceMapGenerator
|
||||
from .sql import *
|
||||
from .template_inheritance import *
|
||||
|
||||
106
odoo-stubs/tools/set_expression.pyi
Normal file
106
odoo-stubs/tools/set_expression.pyi
Normal file
@@ -0,0 +1,106 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Iterable
|
||||
from typing import Any
|
||||
|
||||
class SetDefinitions:
|
||||
def __init__(self, definitions: dict[int, dict]) -> None: ...
|
||||
@property
|
||||
def empty(self) -> SetExpression: ...
|
||||
@property
|
||||
def universe(self) -> SetExpression: ...
|
||||
def parse(self, refs: str, raise_if_not_found: bool = ...) -> SetExpression: ...
|
||||
def from_ids(self, ids, keep_subsets: bool = ...) -> SetExpression: ...
|
||||
def from_key(self, key: str) -> SetExpression: ...
|
||||
def get_id(self, ref): ...
|
||||
|
||||
class SetExpression(ABC):
|
||||
@abstractmethod
|
||||
def is_empty(self) -> bool: ...
|
||||
@abstractmethod
|
||||
def is_universal(self) -> bool: ...
|
||||
@abstractmethod
|
||||
def invert_intersect(self, factor: SetExpression) -> SetExpression: ...
|
||||
@abstractmethod
|
||||
def matches(self, user_group_ids: Iterable[int]) -> bool: ...
|
||||
@property
|
||||
@abstractmethod
|
||||
def key(self) -> str: ...
|
||||
@abstractmethod
|
||||
def __and__(self, other: SetExpression) -> SetExpression: ...
|
||||
@abstractmethod
|
||||
def __or__(self, other: SetExpression) -> SetExpression: ...
|
||||
@abstractmethod
|
||||
def __invert__(self) -> SetExpression: ...
|
||||
@abstractmethod
|
||||
def __eq__(self, other: SetExpression) -> bool: ...
|
||||
@abstractmethod
|
||||
def __le__(self, other: SetExpression) -> bool: ...
|
||||
@abstractmethod
|
||||
def __lt__(self, other: SetExpression) -> bool: ...
|
||||
@abstractmethod
|
||||
def __hash__(self): ...
|
||||
|
||||
class Union(SetExpression):
|
||||
def __init__(self, inters: Iterable[Inter] = ..., optimal: bool = ...) -> None: ...
|
||||
@property
|
||||
def key(self) -> str: ...
|
||||
def is_empty(self) -> bool: ...
|
||||
def is_universal(self) -> bool: ...
|
||||
def invert_intersect(self, factor: Union) -> SetExpression: ...
|
||||
def __and__(self, other: Union) -> SetExpression: ...
|
||||
def __or__(self, other: Union) -> SetExpression: ...
|
||||
def __invert__(self) -> Union: ...
|
||||
def matches(self, user_group_ids) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __eq__(self, other: Union) -> bool: ...
|
||||
def __le__(self, other: Union) -> bool: ...
|
||||
def __lt__(self, other: Union) -> bool: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class Inter:
|
||||
leaves: list
|
||||
key: tuple
|
||||
def __init__(self, leaves: Iterable[Leaf] = ..., optimal: bool = ...) -> None: ...
|
||||
def is_empty(self) -> bool: ...
|
||||
def is_universal(self) -> bool: ...
|
||||
def matches(self, user_group_ids) -> bool: ...
|
||||
def __and__(self, other: Inter) -> Inter: ...
|
||||
def __eq__(self, other: Inter) -> bool: ...
|
||||
def __le__(self, other: Inter) -> bool: ...
|
||||
def __lt__(self, other: Inter) -> bool: ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class Leaf:
|
||||
id: ...
|
||||
ref: ...
|
||||
negative: bool
|
||||
key: ...
|
||||
subsets: set
|
||||
supersets: set
|
||||
disjoints: set
|
||||
inverse: Leaf | None
|
||||
def __init__(
|
||||
self, leaf_id, ref: Any | None = ..., negative: bool = ...
|
||||
) -> None: ...
|
||||
def __invert__(self): ...
|
||||
def is_empty(self) -> bool: ...
|
||||
def is_universal(self) -> bool: ...
|
||||
def isdisjoint(self, other: Leaf) -> bool: ...
|
||||
def matches(self, user_group_ids): ...
|
||||
def __eq__(self, other: Leaf) -> bool: ...
|
||||
def __le__(self, other: Leaf) -> bool: ...
|
||||
def __lt__(self, other: Leaf) -> bool: ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class UnknownId(str):
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
|
||||
UNIVERSAL_LEAF: Leaf
|
||||
EMPTY_LEAF: Leaf
|
||||
EMPTY_INTER: Inter
|
||||
UNIVERSAL_INTER: Inter
|
||||
EMPTY_UNION: Union
|
||||
UNIVERSAL_UNION: Union
|
||||
Reference in New Issue
Block a user