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:
@@ -1,17 +1,34 @@
|
||||
from . import addons as addons, api as api, cli as cli, conf as conf, fields as fields, http as http, loglevels as loglevels, models as models, netsvc as netsvc, osv as osv, release as release, service as service, sql_db as sql_db, tools as tools, upgrade as upgrade
|
||||
from psycopg2 import connection
|
||||
|
||||
from . import (
|
||||
addons as addons,
|
||||
api as api,
|
||||
cli as cli,
|
||||
conf as conf,
|
||||
fields as fields,
|
||||
http as http,
|
||||
loglevels as loglevels,
|
||||
models as models,
|
||||
netsvc as netsvc,
|
||||
osv as osv,
|
||||
release as release,
|
||||
service as service,
|
||||
sql_db as sql_db,
|
||||
tools as tools,
|
||||
upgrade as upgrade
|
||||
)
|
||||
from .api import Registry
|
||||
from .fields import Command as Command
|
||||
from .tools.translate import _ as _, _lt as _lt
|
||||
from typing import Any
|
||||
|
||||
__path__: Any
|
||||
evented: bool
|
||||
|
||||
def gevent_wait_callback(conn, timeout: Any | None = ...) -> None: ...
|
||||
def gevent_wait_callback(conn: connection, timeout: float | None = ...) -> None: ...
|
||||
|
||||
multi_process: bool
|
||||
|
||||
def _decompress(data): ...
|
||||
def _decompress(data: bytes) -> bytes: ...
|
||||
|
||||
SUPERUSER_ID: int
|
||||
|
||||
def registry(database_name: Any | None = ...): ...
|
||||
def registry(database_name: str | None = ...) -> Registry: ...
|
||||
|
||||
@@ -1,133 +1,131 @@
|
||||
from collections import defaultdict
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
from typing import Any, Callable, Generator, Iterator, KeysView, Literal, Mapping, Optional, TypeVar, Union
|
||||
from weakref import WeakSet
|
||||
|
||||
from .fields import Field
|
||||
from .models import BaseModel
|
||||
from .modules.registry import Registry
|
||||
from .sql_db import Cursor
|
||||
from .tools import StackMap
|
||||
from .tools import frozendict, StackMap
|
||||
|
||||
__all__: Any
|
||||
_logger: Any
|
||||
INHERITED_ATTRS: Any
|
||||
_T = TypeVar('_T')
|
||||
_ModelT = TypeVar('_ModelT', bound=BaseModel)
|
||||
_CallableT = TypeVar('_CallableT', bound=Callable)
|
||||
|
||||
INHERITED_ATTRS: tuple[str, ...]
|
||||
|
||||
class Params:
|
||||
args: Any
|
||||
kwargs: Any
|
||||
def __init__(self, args, kwargs) -> None: ...
|
||||
def __str__(self): ...
|
||||
args: tuple
|
||||
kwargs: dict
|
||||
def __init__(self, args: tuple, kwargs: dict) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class Meta(type):
|
||||
def __new__(meta, name, bases, attrs): ...
|
||||
def __new__(meta, name: str, bases: tuple, attrs: dict): ...
|
||||
|
||||
def attrsetter(attr, value): ...
|
||||
def propagate(method1, method2): ...
|
||||
def constrains(*args): ...
|
||||
def ondelete(at_uninstall): ...
|
||||
def onchange(*args): ...
|
||||
def depends(*args): ...
|
||||
def depends_context(*args): ...
|
||||
def returns(model, downgrade: Any | None = ..., upgrade: Any | None = ...): ...
|
||||
def downgrade(method, value, self, args, kwargs): ...
|
||||
def split_context(method, args, kwargs): ...
|
||||
def autovacuum(method): ...
|
||||
def model(method): ...
|
||||
def attrsetter(attr, value) -> Callable: ...
|
||||
def propagate(method1: Callable, method2: _CallableT) -> _CallableT: ...
|
||||
def constrains(*args: str) -> Callable: ...
|
||||
def ondelete(*, at_uninstall: bool) -> Callable: ...
|
||||
def onchange(*args: str) -> Callable: ...
|
||||
def depends(*args: Union[str, Callable]) -> Callable: ...
|
||||
def depends_context(*args: str) -> Callable: ...
|
||||
def returns(model: str | None, downgrade: Callable | None = ..., upgrade: Callable | None = ...) -> Callable: ...
|
||||
def downgrade(method: Callable, value, self, args, kwargs): ...
|
||||
def split_context(method: Callable, args, kwargs) -> tuple: ...
|
||||
def autovacuum(method: Callable) -> Callable: ...
|
||||
def model(method: Callable) -> Callable: ...
|
||||
|
||||
_create_logger: Any
|
||||
|
||||
def _model_create_single(create, self, arg): ...
|
||||
def model_create_single(method): ...
|
||||
def _model_create_multi(create, self, arg): ...
|
||||
def model_create_multi(method): ...
|
||||
def _call_kw_model(method, self, args, kwargs): ...
|
||||
def _call_kw_model_create(method, self, args, kwargs): ...
|
||||
def _call_kw_multi(method, self, args, kwargs): ...
|
||||
def call_kw(model, name, args, kwargs): ...
|
||||
def _model_create_single(create: Callable[..., _ModelT], self: _ModelT, arg) -> _ModelT: ...
|
||||
def model_create_single(method: _CallableT) -> _CallableT: ...
|
||||
def _model_create_multi(create: Callable[..., _ModelT], self: _ModelT, arg) -> _ModelT: ...
|
||||
def model_create_multi(method: _CallableT) -> _CallableT: ...
|
||||
def _call_kw_model(method: Callable[..., _ModelT], self: _ModelT, args, kwargs): ...
|
||||
def _call_kw_model_create(method: Callable[..., _ModelT], self: _ModelT, args, kwargs) -> list[int] | int | Literal[False]: ...
|
||||
def _call_kw_multi(method: Callable[..., _ModelT], self: _ModelT, args, kwargs): ...
|
||||
def call_kw(model: BaseModel, name: str, args, kwargs): ...
|
||||
|
||||
class Environment(Mapping):
|
||||
_local: Any = ...
|
||||
cr: Cursor = ...
|
||||
uid: int = ...
|
||||
context: dict = ...
|
||||
su: bool = ...
|
||||
envs: Any
|
||||
envs: None
|
||||
args: tuple[Cursor, int, dict, bool]
|
||||
@classmethod
|
||||
def manage(cls) -> None: ...
|
||||
def manage(cls) -> Generator[None, None, None]: ...
|
||||
def reset(self) -> None: ...
|
||||
all: Transaction
|
||||
transaction: Transaction
|
||||
registry: Registry
|
||||
cache: Cache
|
||||
_cache_key: Any
|
||||
_protected: Any
|
||||
def __new__(cls, cr: Cursor, uid, context, su: bool = ...) -> Environment: ...
|
||||
def __contains__(self, model_name): ...
|
||||
def __getitem__(self, model_name): ...
|
||||
def __iter__(self): ...
|
||||
_cache_key: dict[Field, Any]
|
||||
_protected: StackMap[Field, set[int]]
|
||||
def __new__(cls, cr: Cursor, uid: int, context: dict, su: bool = ...) -> Environment: ...
|
||||
def __contains__(self, model_name: str) -> bool: ...
|
||||
def __getitem__(self, model_name: str) -> BaseModel: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __call__(self, cr: Cursor | None = ..., user: Any | None = ..., context: Any | None = ..., su: Any | None = ...) -> Environment: ...
|
||||
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
|
||||
def __call__(self, cr: Cursor | None = ..., user: Union['odoo.model.res_users', int, None] = ..., context: dict | None = ..., su: bool | None = ...) -> Environment: ...
|
||||
def ref(self, xml_id: str, raise_if_not_found: bool = ...) -> Optional[BaseModel]: ...
|
||||
def is_superuser(self) -> bool: ...
|
||||
def is_admin(self) -> bool: ...
|
||||
def is_system(self) -> bool: ...
|
||||
@property
|
||||
def user(self):
|
||||
return self['res.users']
|
||||
def user(self) -> 'odoo.model.res_users': ...
|
||||
@property
|
||||
def company(self):
|
||||
return self['res.company']
|
||||
def company(self) -> 'odoo.model.res_company': ...
|
||||
@property
|
||||
def companies(self):
|
||||
return self['res.company']
|
||||
def companies(self) -> 'odoo.model.res_company': ...
|
||||
@property
|
||||
def lang(self) -> str: ...
|
||||
def clear(self) -> None: ...
|
||||
def clear_upon_failure(self): ...
|
||||
def is_protected(self, field, record): ...
|
||||
def protected(self, field): ...
|
||||
def protecting(self, what, records: Any | None = ...) -> None: ...
|
||||
def fields_to_compute(self): ...
|
||||
def records_to_compute(self, field): ...
|
||||
def is_to_compute(self, field, record): ...
|
||||
def not_to_compute(self, field, records): ...
|
||||
def add_to_compute(self, field, records): ...
|
||||
def remove_to_compute(self, field, records) -> None: ...
|
||||
def norecompute(self) -> None: ...
|
||||
def cache_key(self, field): ...
|
||||
def is_protected(self, field: Field, record: BaseModel) -> bool: ...
|
||||
def protected(self, field: Field) -> BaseModel: ...
|
||||
def protecting(self, what, records: Optional[BaseModel] = ...) -> Generator[None, None, None]: ...
|
||||
def fields_to_compute(self) -> KeysView[Field]: ...
|
||||
def records_to_compute(self, field: Field) -> BaseModel: ...
|
||||
def is_to_compute(self, field: Field, record: BaseModel) -> bool: ...
|
||||
def not_to_compute(self, field: Field, records: _ModelT) -> _ModelT: ...
|
||||
def add_to_compute(self, field: Field, records: BaseModel): ...
|
||||
def remove_to_compute(self, field: Field, records: BaseModel) -> None: ...
|
||||
def norecompute(self) -> Generator[None, None, None]: ...
|
||||
def cache_key(self, field: Field): ...
|
||||
|
||||
class Transaction:
|
||||
registry: Any
|
||||
envs: WeakSet
|
||||
registry: Registry
|
||||
envs: WeakSet[Environment]
|
||||
cache: Cache
|
||||
protected: StackMap
|
||||
tocompute: defaultdict
|
||||
towrite: defaultdict
|
||||
def __init__(self, registry): ...
|
||||
protected: StackMap[Field, set[int]]
|
||||
tocompute: defaultdict[Field, set[int]]
|
||||
towrite: defaultdict[str, dict[int, dict[str, Any]]]
|
||||
def __init__(self, registry: Registry): ...
|
||||
def flush(self) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
|
||||
NOTHING: Any
|
||||
EMPTY_DICT: Any
|
||||
NOTHING: object
|
||||
EMPTY_DICT: frozendict
|
||||
|
||||
class Cache:
|
||||
_data: Any
|
||||
_data: defaultdict[Field, dict]
|
||||
def __init__(self) -> None: ...
|
||||
def _get_field_cache(self, model, field): ...
|
||||
def _set_field_cache(self, model, field): ...
|
||||
def contains(self, record, field): ...
|
||||
def get(self, record, field, default=...): ...
|
||||
def set(self, record, field, value) -> None: ...
|
||||
def update(self, records, field, values) -> None: ...
|
||||
def remove(self, record, field) -> None: ...
|
||||
def get_values(self, records, field) -> None: ...
|
||||
def get_until_miss(self, records, field): ...
|
||||
def get_records_different_from(self, records, field, value): ...
|
||||
def get_fields(self, record) -> None: ...
|
||||
def get_records(self, model, field): ...
|
||||
def get_missing_ids(self, records, field) -> None: ...
|
||||
def invalidate(self, spec: Any | None = ...) -> None: ...
|
||||
def check(self, env) -> None: ...
|
||||
def _get_field_cache(self, model: BaseModel, field: Field) -> dict: ...
|
||||
def _set_field_cache(self, model: BaseModel, field: Field): ...
|
||||
def contains(self, record: BaseModel, field: Field) -> bool: ...
|
||||
def get(self, record: BaseModel, field: Field, default=...): ...
|
||||
def set(self, record: BaseModel, field: Field, value) -> None: ...
|
||||
def update(self, records: BaseModel, field: Field, values) -> None: ...
|
||||
def remove(self, record: BaseModel, field: Field) -> None: ...
|
||||
def get_values(self, records: BaseModel, field: Field) -> Iterator: ...
|
||||
def get_until_miss(self, records: BaseModel, field: Field) -> list: ...
|
||||
def get_records_different_from(self, records: _ModelT, field: Field, value) -> _ModelT: ...
|
||||
def get_fields(self, record: BaseModel) -> Iterator[Field]: ...
|
||||
def get_records(self, model: _ModelT, field: Field) -> _ModelT: ...
|
||||
def get_missing_ids(self, records: BaseModel, field: Field) -> Iterator[int]: ...
|
||||
def invalidate(self, spec: list[tuple[Field, tuple | None]] | None = ...) -> None: ...
|
||||
def check(self, env: Environment) -> None: ...
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
from .fields import Field
|
||||
from .models import BaseModel
|
||||
|
||||
class UserError(Exception):
|
||||
def __init__(self, message) -> None: ...
|
||||
def __init__(self, message: str) -> None: ...
|
||||
@property
|
||||
def name(self): ...
|
||||
|
||||
class RedirectWarning(Exception):
|
||||
def __init__(self, message, action, button_text, additional_context: Any | None = ...) -> None: ...
|
||||
def __init__(self, message: str, action: int, button_text: str, additional_context: dict | None = ...) -> None: ...
|
||||
@property
|
||||
def name(self): ...
|
||||
|
||||
class AccessDenied(UserError):
|
||||
__cause__: Any
|
||||
traceback: Any
|
||||
traceback: tuple[str, str, str]
|
||||
def __init__(self, message: str = ...) -> None: ...
|
||||
|
||||
class AccessError(UserError): ...
|
||||
|
||||
class CacheMiss(KeyError):
|
||||
def __init__(self, record, field) -> None: ...
|
||||
def __init__(self, record: BaseModel, field: Field) -> None: ...
|
||||
|
||||
class MissingError(UserError): ...
|
||||
class ValidationError(UserError): ...
|
||||
|
||||
@@ -1,244 +1,255 @@
|
||||
import datetime
|
||||
import enum
|
||||
from typing import Any
|
||||
from typing import Any, Callable, Iterator, Sequence, TypeVar, Union
|
||||
|
||||
from .tools import date_utils
|
||||
import psycopg2
|
||||
from markupsafe import Markup
|
||||
|
||||
DATE_LENGTH: Any
|
||||
DATETIME_LENGTH: Any
|
||||
from .api import Environment, Registry
|
||||
from .models import BaseModel
|
||||
from .tools import date_utils, float_utils
|
||||
|
||||
_ModelT = TypeVar('_ModelT', bound=BaseModel)
|
||||
_Selection = list[tuple[str, str]]
|
||||
_SelectionRaw = _Selection | Callable[..., _Selection] | str
|
||||
_Domain = list
|
||||
_DomainRaw = _Domain | Callable[..., _Domain]
|
||||
_CommandList = list[tuple[BaseModel, list]]
|
||||
_SeqIntT = TypeVar('_SeqIntT', bound=Sequence[int])
|
||||
|
||||
DATE_LENGTH: int
|
||||
DATETIME_LENGTH: int
|
||||
NO_ACCESS: str
|
||||
IR_MODELS: Any
|
||||
_logger: Any
|
||||
_schema: Any
|
||||
Default: Any
|
||||
IR_MODELS: tuple[str, ...]
|
||||
Default: object
|
||||
|
||||
def first(records): ...
|
||||
def resolve_mro(model, name, predicate): ...
|
||||
def first(records: _ModelT) -> _ModelT: ...
|
||||
def resolve_mro(model: BaseModel, name: str, predicate: Callable[..., bool]): ...
|
||||
|
||||
class MetaField(type):
|
||||
by_type: Any
|
||||
def __init__(cls, name, bases, attrs) -> None: ...
|
||||
by_type: dict
|
||||
def __init__(cls: type[Field], name, bases, attrs) -> None: ...
|
||||
|
||||
_global_seq: Any
|
||||
|
||||
class Field:
|
||||
type: Any
|
||||
class Field(metaclass=MetaField):
|
||||
type: str | None
|
||||
relational: bool
|
||||
translate: bool
|
||||
column_type: Any
|
||||
column_type: tuple[str, str] | None
|
||||
column_format: str
|
||||
column_cast_from: Any
|
||||
column_cast_from: tuple[str, ...]
|
||||
write_sequence: int
|
||||
args: Any
|
||||
_module: Any
|
||||
_modules: Any
|
||||
_module: str
|
||||
_modules: tuple[str, ...]
|
||||
_setup_done: bool
|
||||
_sequence: Any
|
||||
_base_fields: Any
|
||||
_extra_keys: Any
|
||||
_sequence: int | None
|
||||
_base_fields: tuple[Field, ...]
|
||||
_extra_keys: tuple[str, ...]
|
||||
_direct: bool
|
||||
_toplevel: bool
|
||||
automatic: bool
|
||||
inherited: bool
|
||||
inherited_field: Any
|
||||
name: Any
|
||||
model_name: Any
|
||||
comodel_name: Any
|
||||
inherited_field: Field | None
|
||||
name: str
|
||||
model_name: str
|
||||
comodel_name: str | None
|
||||
store: bool
|
||||
index: bool
|
||||
manual: bool
|
||||
copy: bool
|
||||
_depends: Any
|
||||
_depends_context: Any
|
||||
_depends: tuple[Field, ...] | None
|
||||
_depends_context: tuple[str, ...] | None
|
||||
recursive: bool
|
||||
compute: Any
|
||||
compute: str | Callable | None
|
||||
compute_sudo: bool
|
||||
inverse: Any
|
||||
search: Any
|
||||
related: Any
|
||||
inverse: str | Callable | None
|
||||
search: str | Callable | None
|
||||
related: str | None
|
||||
company_dependent: bool
|
||||
default: Any
|
||||
string: Any
|
||||
help: Any
|
||||
string: str | None
|
||||
help: str | None
|
||||
invisible: bool
|
||||
readonly: bool
|
||||
required: bool
|
||||
states: Any
|
||||
groups: Any
|
||||
states: dict[str, list[tuple]] | None
|
||||
groups: str | None
|
||||
change_default: bool
|
||||
deprecated: Any
|
||||
related_field: Any
|
||||
group_operator: Any
|
||||
group_expand: Any
|
||||
deprecated: bool | None
|
||||
related_field: Field | None
|
||||
group_operator: str | None
|
||||
group_expand: str | None
|
||||
prefetch: bool
|
||||
def __init__(self, string=..., **kwargs) -> None: ...
|
||||
related_attrs: list[tuple[str, str]]
|
||||
description_attrs: list[tuple[str, str]]
|
||||
def __init__(self, string: str = ..., **kwargs) -> None: ...
|
||||
def new(self, **kwargs): ...
|
||||
def __str__(self): ...
|
||||
def __repr__(self): ...
|
||||
def __set_name__(self, owner, name) -> None: ...
|
||||
def _get_attrs(self, model_class, name): ...
|
||||
def _setup_attrs(self, model_class, name): ...
|
||||
def __str__(self) -> str: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __set_name__(self, owner: type[BaseModel], name: str) -> None: ...
|
||||
def _get_attrs(self, model_class: type[BaseModel], name: str) -> dict[str, Any]: ...
|
||||
def _setup_attrs(self, model_class: type[BaseModel], name: str): ...
|
||||
def prepare_setup(self) -> None: ...
|
||||
def setup(self, model) -> None: ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def get_depends(self, model): ...
|
||||
def setup_related(self, model) -> None: ...
|
||||
def traverse_related(self, record): ...
|
||||
def _compute_related(self, records) -> None: ...
|
||||
def setup(self, model: BaseModel) -> None: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def get_depends(self, model: BaseModel) -> tuple: ...
|
||||
def setup_related(self, model: BaseModel) -> None: ...
|
||||
def traverse_related(self, record: _ModelT) -> tuple[_ModelT, Field]: ...
|
||||
def _compute_related(self, records: BaseModel) -> None: ...
|
||||
def _process_related(self, value): ...
|
||||
def _inverse_related(self, records) -> None: ...
|
||||
def _search_related(self, records, operator, value): ...
|
||||
_related_comodel_name: Any
|
||||
_related_string: Any
|
||||
_related_help: Any
|
||||
_related_groups: Any
|
||||
_related_group_operator: Any
|
||||
def _inverse_related(self, records: BaseModel) -> None: ...
|
||||
def _search_related(self, records: BaseModel, operator: str, value) -> list: ...
|
||||
_related_comodel_name: str | None
|
||||
_related_string: str | None
|
||||
_related_help: str | None
|
||||
_related_groups: str | None
|
||||
_related_group_operator: str | None
|
||||
@property
|
||||
def base_field(self): ...
|
||||
def base_field(self) -> Field: ...
|
||||
@property
|
||||
def groupable(self): ...
|
||||
def _default_company_dependent(self, model): ...
|
||||
def _compute_company_dependent(self, records) -> None: ...
|
||||
def _inverse_company_dependent(self, records) -> None: ...
|
||||
def _search_company_dependent(self, records, operator, value): ...
|
||||
def resolve_depends(self, registry) -> None: ...
|
||||
def get_description(self, env): ...
|
||||
_description_store: Any
|
||||
def groupable(self) -> bool: ...
|
||||
def _default_company_dependent(self, model: BaseModel): ...
|
||||
def _compute_company_dependent(self, records: BaseModel) -> None: ...
|
||||
def _inverse_company_dependent(self, records: BaseModel) -> None: ...
|
||||
def _search_company_dependent(self, records: BaseModel, operator: str, value): ...
|
||||
def resolve_depends(self, registry: Registry) -> Iterator[tuple]: ...
|
||||
def get_description(self, env: Environment) -> dict[str, Any]: ...
|
||||
_description_store: bool | None
|
||||
_description_manual: Any
|
||||
_description_related: Any
|
||||
_description_company_dependent: Any
|
||||
_description_readonly: Any
|
||||
_description_required: Any
|
||||
_description_states: Any
|
||||
_description_groups: Any
|
||||
_description_change_default: Any
|
||||
_description_deprecated: Any
|
||||
_description_group_operator: Any
|
||||
def _description_depends(self, env): ...
|
||||
_description_related: str | None
|
||||
_description_company_dependent: bool
|
||||
_description_readonly: bool
|
||||
_description_required: bool
|
||||
_description_states: dict[str, list[tuple]] | None
|
||||
_description_groups: str | None
|
||||
_description_change_default: bool
|
||||
_description_deprecated: bool | None
|
||||
_description_group_operator: str | None
|
||||
def _description_depends(self, env: Environment): ...
|
||||
@property
|
||||
def _description_searchable(self): ...
|
||||
def _description_searchable(self) -> bool: ...
|
||||
@property
|
||||
def _description_sortable(self): ...
|
||||
def _description_string(self, env): ...
|
||||
def _description_help(self, env): ...
|
||||
def is_editable(self): ...
|
||||
def null(self, record): ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_record_multi(self, values, records): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record): ...
|
||||
def convert_to_onchange(self, value, record, names): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def convert_to_display_name(self, value, record): ...
|
||||
def update_db(self, model, columns): ...
|
||||
def update_db_column(self, model, column) -> None: ...
|
||||
def update_db_notnull(self, model, column) -> None: ...
|
||||
def update_db_related(self, model) -> None: ...
|
||||
def read(self, records) -> None: ...
|
||||
def create(self, record_values) -> None: ...
|
||||
def write(self, records, value): ...
|
||||
# def __get__(self, record, owner): ...
|
||||
def mapped(self, records): ...
|
||||
def __set__(self, records, value): ...
|
||||
def recompute(self, records) -> None: ...
|
||||
def compute_value(self, records) -> None: ...
|
||||
def determine_inverse(self, records) -> None: ...
|
||||
def determine_domain(self, records, operator, value): ...
|
||||
def _description_sortable(self) -> bool: ...
|
||||
def _description_string(self, env: Environment) -> str | None: ...
|
||||
def _description_help(self, env: Environment) -> str | None: ...
|
||||
def is_editable(self) -> bool: ...
|
||||
def null(self, record: BaseModel) -> bool: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_record_multi(self, values, records: BaseModel): ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record: BaseModel): ...
|
||||
def convert_to_onchange(self, value, record: BaseModel, names): ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
def convert_to_display_name(self, value, record: BaseModel): ...
|
||||
def update_db(self, model: BaseModel, columns: dict[str, Any]): ...
|
||||
def update_db_column(self, model: BaseModel, column: dict | None) -> None: ...
|
||||
def update_db_notnull(self, model: BaseModel, column: dict | None) -> None: ...
|
||||
def update_db_related(self, model: BaseModel) -> None: ...
|
||||
def read(self, records: BaseModel) -> None: ...
|
||||
def create(self, record_values: list[tuple[BaseModel, Any]]) -> None: ...
|
||||
def write(self, records: _ModelT, value) -> _ModelT: ...
|
||||
def __get__(self, record: Union[BaseModel, None], owner): ...
|
||||
def mapped(self, records: BaseModel): ...
|
||||
def __set__(self, records: BaseModel, value): ...
|
||||
def recompute(self, records: BaseModel) -> None: ...
|
||||
def compute_value(self, records: BaseModel) -> None: ...
|
||||
def determine_inverse(self, records: BaseModel) -> None: ...
|
||||
def determine_domain(self, records: BaseModel, operator: str, value) -> list: ...
|
||||
|
||||
class Boolean(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
column_type: type[str, str]
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> bool: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> bool: ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
|
||||
class Integer(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_type: type[str, str]
|
||||
group_operator: str
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def _update(self, records, value) -> None: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> int: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> int | None: ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...): ...
|
||||
def _update(self, records: BaseModel, value) -> None: ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
|
||||
class Float(Field):
|
||||
type: str
|
||||
column_cast_from: Any
|
||||
_digits: Any
|
||||
column_cast_from: tuple[str, str, str]
|
||||
_digits: tuple[int, int] | str | None
|
||||
group_operator: str
|
||||
def __init__(self, string=..., digits=..., **kwargs) -> None: ...
|
||||
def __init__(self, string: str = ..., digits: tuple[int, int] | str | None =..., **kwargs) -> None: ...
|
||||
@property
|
||||
def column_type(self): ...
|
||||
def get_digits(self, env): ...
|
||||
def get_digits(self, env: Environment) -> tuple[int, int]: ...
|
||||
_related__digits: Any
|
||||
def _description_digits(self, env): ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
round: Any
|
||||
is_zero: Any
|
||||
compare: Any
|
||||
def _description_digits(self, env: Environment) -> type[int, int]: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> float: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> float: ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
round = float_utils.float_round
|
||||
is_zero = float_utils.float_is_zero
|
||||
compare = float_utils.float_compare
|
||||
|
||||
class Monetary(Field):
|
||||
type: str
|
||||
write_sequence: int
|
||||
column_type: Any
|
||||
column_cast_from: Any
|
||||
currency_field: Any
|
||||
column_type: tuple[str, str]
|
||||
column_cast_from: tuple[str]
|
||||
currency_field: str | None
|
||||
group_operator: str
|
||||
def __init__(self, string=..., currency_field=..., **kwargs) -> None: ...
|
||||
def _description_currency_field(self, env): ...
|
||||
def get_currency_field(self, model): ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def setup_related(self, model) -> None: ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record): ...
|
||||
def __init__(self, string: str = ..., currency_field : str =..., **kwargs) -> None: ...
|
||||
def _description_currency_field(self, env: Environment) -> str: ...
|
||||
def get_currency_field(self, model: BaseModel) -> str: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def setup_related(self, model: BaseModel) -> None: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> float: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> float: ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record: BaseModel): ...
|
||||
|
||||
class _String(Field):
|
||||
translate: bool
|
||||
translate: Callable | bool
|
||||
prefetch: Any
|
||||
def __init__(self, string=..., **kwargs) -> None: ...
|
||||
def _setup_attrs(self, model_class, name) -> None: ...
|
||||
_related_translate: Any
|
||||
def _description_translate(self, env): ...
|
||||
def get_trans_terms(self, value): ...
|
||||
def get_trans_func(self, records): ...
|
||||
def write(self, records, value): ...
|
||||
def __init__(self, string: str = ..., **kwargs) -> None: ...
|
||||
def _setup_attrs(self, model_class: type[BaseModel], name: str) -> None: ...
|
||||
_related_translate: bool
|
||||
def _description_translate(self, env: Environment) -> bool: ...
|
||||
def get_trans_terms(self, value) -> list: ...
|
||||
def get_trans_func(self, records: BaseModel) -> Callable: ...
|
||||
def write(self, records: _ModelT, value) -> _ModelT: ...
|
||||
|
||||
class Char(_String):
|
||||
type: str
|
||||
column_cast_from: Any
|
||||
size: Any
|
||||
column_cast_from: tuple[str]
|
||||
size: int | None
|
||||
trim: bool
|
||||
def _setup_attrs(self, model_class, name) -> None: ...
|
||||
def _setup_attrs(self, model_class: type[BaseModel], name: str) -> None: ...
|
||||
@property
|
||||
def column_type(self): ...
|
||||
def update_db_column(self, model, column) -> None: ...
|
||||
_related_size: Any
|
||||
_related_trim: Any
|
||||
_description_size: Any
|
||||
_description_trim: Any
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def column_type(self) -> tuple[str, str]: ...
|
||||
def update_db_column(self, model: BaseModel, column: dict | None) -> None: ...
|
||||
_related_size: int | None
|
||||
_related_trim: bool
|
||||
_description_size: int | None
|
||||
_description_trim: bool
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> str | None: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> str | None: ...
|
||||
|
||||
class Text(_String):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_cast_from: Any
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
column_type: tuple[str, str]
|
||||
column_cast_from: tuple[str]
|
||||
def convert_to_cache(self, value, record, validate: bool = ...) -> str | None: ...
|
||||
|
||||
class Html(_String):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_cast_from: Any
|
||||
column_type: tuple[str, str]
|
||||
column_cast_from: tuple[str]
|
||||
sanitize: bool
|
||||
sanitize_tags: bool
|
||||
sanitize_attributes: bool
|
||||
@@ -246,29 +257,29 @@ class Html(_String):
|
||||
sanitize_form: bool
|
||||
strip_style: bool
|
||||
strip_classes: bool
|
||||
def _get_attrs(self, model_class, name): ...
|
||||
_related_sanitize: Any
|
||||
_related_sanitize_tags: Any
|
||||
_related_sanitize_attributes: Any
|
||||
_related_sanitize_style: Any
|
||||
_related_strip_style: Any
|
||||
_related_strip_classes: Any
|
||||
_description_sanitize: Any
|
||||
_description_sanitize_tags: Any
|
||||
_description_sanitize_attributes: Any
|
||||
_description_sanitize_style: Any
|
||||
_description_strip_style: Any
|
||||
_description_strip_classes: Any
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def get_trans_terms(self, value): ...
|
||||
def _get_attrs(self, model_class: type[BaseModel], name: str) -> dict[str, Any]: ...
|
||||
_related_sanitize: bool
|
||||
_related_sanitize_tags: bool
|
||||
_related_sanitize_attributes: bool
|
||||
_related_sanitize_style: bool
|
||||
_related_strip_style: bool
|
||||
_related_strip_classes: bool
|
||||
_description_sanitize: bool
|
||||
_description_sanitize_tags: bool
|
||||
_description_sanitize_attributes: bool
|
||||
_description_sanitize_style: bool
|
||||
_description_strip_style: bool
|
||||
_description_strip_classes: bool
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> Markup | None: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> Markup | None: ...
|
||||
def convert_to_record(self, value, record: BaseModel) -> Markup | None: ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...) -> Markup | None: ...
|
||||
def get_trans_terms(self, value) -> list: ...
|
||||
|
||||
class Date(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_cast_from: Any
|
||||
column_type: tuple[str, str]
|
||||
column_cast_from: tuple[str]
|
||||
start_of = date_utils.start_of
|
||||
end_of = date_utils.end_of
|
||||
add = date_utils.add
|
||||
@@ -276,19 +287,19 @@ class Date(Field):
|
||||
@staticmethod
|
||||
def today(*args) -> datetime.date: ...
|
||||
@staticmethod
|
||||
def context_today(record, timestamp: Any | None = ...) -> datetime.date: ...
|
||||
def context_today(record: BaseModel, timestamp: datetime.datetime | None = ...) -> datetime.date: ...
|
||||
@staticmethod
|
||||
def to_date(value) -> datetime.date: ...
|
||||
def to_date(value) -> datetime.date | None: ...
|
||||
from_string = to_date
|
||||
@staticmethod
|
||||
def to_string(value): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def to_string(value: datetime.datetime | datetime.date) -> str: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> datetime.date | None: ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
|
||||
class Datetime(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_cast_from: Any
|
||||
column_type: tuple[str, str]
|
||||
column_cast_from: tuple[str]
|
||||
start_of = date_utils.start_of
|
||||
end_of = date_utils.end_of
|
||||
add = date_utils.add
|
||||
@@ -298,124 +309,125 @@ class Datetime(Field):
|
||||
@staticmethod
|
||||
def today(*args) -> datetime.datetime: ...
|
||||
@staticmethod
|
||||
def context_timestamp(record, timestamp) -> datetime.datetime: ...
|
||||
def context_timestamp(record: BaseModel, timestamp: datetime.datetime) -> datetime.datetime: ...
|
||||
@staticmethod
|
||||
def to_datetime(value) -> datetime.datetime: ...
|
||||
def to_datetime(value) -> datetime.datetime | None: ...
|
||||
from_string = to_datetime
|
||||
@staticmethod
|
||||
def to_string(value): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def convert_to_display_name(self, value, record): ...
|
||||
def to_string(value: datetime.datetime | datetime.date) -> str: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> datetime.datetime | None: ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
def convert_to_display_name(self, value, record: BaseModel) -> str: ...
|
||||
|
||||
_BINARY = memoryview
|
||||
|
||||
class Binary(Field):
|
||||
type: str
|
||||
prefetch: bool
|
||||
_depends_context: Any
|
||||
_depends_context: tuple[str]
|
||||
attachment: bool
|
||||
@property
|
||||
def column_type(self): ...
|
||||
def _get_attrs(self, model_class, name): ...
|
||||
_description_attachment: Any
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def compute_value(self, records) -> None: ...
|
||||
def read(self, records) -> None: ...
|
||||
def create(self, record_values) -> None: ...
|
||||
def write(self, records, value): ...
|
||||
def column_type(self) -> tuple[str, str] | None: ...
|
||||
def _get_attrs(self, model_class: type[BaseModel], name: str) -> dict[str, Any]: ...
|
||||
_description_attachment: bool
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> psycopg2.Binary | None: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> bytes | None: ...
|
||||
def convert_to_record(self, value, record: BaseModel) -> bytes: ...
|
||||
def compute_value(self, records: BaseModel) -> None: ...
|
||||
def read(self, records: BaseModel) -> None: ...
|
||||
def create(self, record_values: list[tuple[BaseModel, Any]]) -> None: ...
|
||||
def write(self, records: _ModelT, value) -> _ModelT: ...
|
||||
|
||||
class Image(Binary):
|
||||
max_width: int
|
||||
max_height: int
|
||||
verify_resolution: bool
|
||||
def create(self, record_values) -> None: ...
|
||||
def write(self, records, value) -> None: ...
|
||||
def create(self, record_values: list[tuple[BaseModel, Any]]) -> None: ...
|
||||
def write(self, records: BaseModel, value) -> None: ...
|
||||
def _image_process(self, value): ...
|
||||
def _process_related(self, value): ...
|
||||
|
||||
class Selection(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
selection: Any
|
||||
column_type: tuple[str, str]
|
||||
selection: _SelectionRaw
|
||||
validate: bool
|
||||
ondelete: Any
|
||||
def __init__(self, selection=..., string=..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def setup_related(self, model): ...
|
||||
def _get_attrs(self, model_class, name): ...
|
||||
def _setup_attrs(self, model_class, name) -> None: ...
|
||||
def _selection_modules(self, model): ...
|
||||
def _description_selection(self, env): ...
|
||||
def _default_group_expand(self, records, groups, domain, order): ...
|
||||
def get_values(self, env): ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
ondelete: dict[str, Any] | None
|
||||
def __init__(self, selection: _SelectionRaw = ..., string: str = ..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def setup_related(self, model: BaseModel): ...
|
||||
def _get_attrs(self, model_class: type[BaseModel], name: str) -> dict[str, Any]: ...
|
||||
def _setup_attrs(self, model_class: type[BaseModel], name: str) -> None: ...
|
||||
def _selection_modules(self, model: BaseModel) -> dict[str, set[str, str]]: ...
|
||||
def _description_selection(self, env: Environment) -> _Selection: ...
|
||||
def _default_group_expand(self, records: BaseModel, groups, domain, order) -> _Selection: ...
|
||||
def get_values(self, env: Environment) -> _Selection: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||
def convert_to_export(self, value, record: BaseModel): ...
|
||||
|
||||
class Reference(Selection):
|
||||
type: str
|
||||
@property
|
||||
def column_type(self): ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def convert_to_display_name(self, value, record): ...
|
||||
def column_type(self) -> tuple[str, str]: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...) -> str | None: ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...) -> str | None: ...
|
||||
def convert_to_record(self, value, record: BaseModel) -> Union[BaseModel, None]: ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...) -> str | bool: ...
|
||||
def convert_to_export(self, value, record: BaseModel) -> str: ...
|
||||
def convert_to_display_name(self, value, record: BaseModel) -> str: ...
|
||||
|
||||
class _Relational(Field):
|
||||
relational: bool
|
||||
domain: Any
|
||||
context: Any
|
||||
domain: _DomainRaw
|
||||
context: dict
|
||||
check_company: bool
|
||||
# def __get__(self, records, owner): ...
|
||||
def __get__(self, records: Union[BaseModel, None], owner) -> BaseModel: ...
|
||||
comodel_name: str
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def get_domain_list(self, model): ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def get_domain_list(self, model: BaseModel) -> _Domain: ...
|
||||
@property
|
||||
def _related_domain(self): ...
|
||||
_related_context: Any
|
||||
_description_relation: Any
|
||||
_description_context: Any
|
||||
def _description_domain(self, env): ...
|
||||
def null(self, record): ...
|
||||
def _related_domain(self) -> _DomainRaw: ...
|
||||
_related_context: dict
|
||||
_description_relation: str | None
|
||||
_description_context: dict
|
||||
def _description_domain(self, env: Environment) -> _Domain: ...
|
||||
def null(self, record: BaseModel) -> BaseModel: ...
|
||||
|
||||
class Many2one(_Relational):
|
||||
type: str
|
||||
column_type: Any
|
||||
ondelete: Any
|
||||
column_type: tuple[str, str]
|
||||
ondelete: str | None
|
||||
auto_join: bool
|
||||
delegate: bool
|
||||
def __init__(self, comodel_name=..., string=..., **kwargs) -> None: ...
|
||||
def _setup_attrs(self, model_class, name) -> None: ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def update_db(self, model, columns): ...
|
||||
def update_db_column(self, model, column) -> None: ...
|
||||
def update_db_foreign_key(self, model, column) -> None: ...
|
||||
def _update(self, records, value) -> None: ...
|
||||
def convert_to_column(self, value, record, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_record_multi(self, values, records): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def convert_to_display_name(self, value, record): ...
|
||||
def convert_to_onchange(self, value, record, names): ...
|
||||
def write(self, records, value): ...
|
||||
def _remove_inverses(self, records, value): ...
|
||||
def _update_inverses(self, records, value) -> None: ...
|
||||
def __init__(self, comodel_name: str = ..., string: str = ..., **kwargs) -> None: ...
|
||||
def _setup_attrs(self, model_class: type[BaseModel], name: str) -> None: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def update_db(self, model: BaseModel, columns): ...
|
||||
def update_db_column(self, model: BaseModel, column) -> None: ...
|
||||
def update_db_foreign_key(self, model: BaseModel, column) -> None: ...
|
||||
def _update(self, records: BaseModel, value) -> None: ...
|
||||
def convert_to_column(self, value, record: BaseModel, values: Any | None = ..., validate: bool = ...): ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_record_multi(self, values, records: BaseModel): ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record: BaseModel): ...
|
||||
def convert_to_export(self, value, record: BaseModel) -> str: ...
|
||||
def convert_to_display_name(self, value, record: BaseModel) -> str: ...
|
||||
def convert_to_onchange(self, value, record: BaseModel, names): ...
|
||||
def write(self, records: _ModelT, value) -> _ModelT: ...
|
||||
def _remove_inverses(self, records: BaseModel, value): ...
|
||||
def _update_inverses(self, records: BaseModel, value) -> None: ...
|
||||
|
||||
class Many2oneReference(Integer):
|
||||
type: str
|
||||
model_field: Any
|
||||
_related_model_field: Any
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def _remove_inverses(self, records, value) -> None: ...
|
||||
def _update_inverses(self, records, value) -> None: ...
|
||||
def _record_ids_per_res_model(self, records): ...
|
||||
model_field: str | None
|
||||
_related_model_field: str | None
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||
def _remove_inverses(self, records: BaseModel, value) -> None: ...
|
||||
def _update_inverses(self, records: BaseModel, value) -> None: ...
|
||||
def _record_ids_per_res_model(self, records: BaseModel) -> dict[str, set]: ...
|
||||
|
||||
class Command(enum.IntEnum):
|
||||
CREATE: int
|
||||
@@ -426,81 +438,81 @@ class Command(enum.IntEnum):
|
||||
CLEAR: int
|
||||
SET: int
|
||||
@classmethod
|
||||
def create(cls, values: dict): ...
|
||||
def create(cls, values: dict) -> tuple[int, int, dict]: ...
|
||||
@classmethod
|
||||
def update(cls, id: int, values: dict): ...
|
||||
def update(cls, id: int, values: dict) -> tuple[int, int, dict]: ...
|
||||
@classmethod
|
||||
def delete(cls, id: int): ...
|
||||
def delete(cls, id: int) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def unlink(cls, id: int): ...
|
||||
def unlink(cls, id: int) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def link(cls, id: int): ...
|
||||
def link(cls, id: int) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def clear(cls): ...
|
||||
def clear(cls) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def set(cls, ids: list): ...
|
||||
def set(cls, ids: _SeqIntT) -> tuple[int, int, _SeqIntT]: ...
|
||||
|
||||
class _RelationalMulti(_Relational):
|
||||
write_sequence: int
|
||||
def _update(self, records, value): ...
|
||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record): ...
|
||||
def convert_to_record_multi(self, values, records): ...
|
||||
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record): ...
|
||||
def convert_to_export(self, value, record): ...
|
||||
def convert_to_display_name(self, value, record) -> None: ...
|
||||
def get_depends(self, model): ...
|
||||
def create(self, record_values) -> None: ...
|
||||
def write(self, records, value): ...
|
||||
def write_batch(self, records_commands_list, create: bool = ...): ...
|
||||
def _update(self, records: BaseModel, value): ...
|
||||
def convert_to_cache(self, value, record: BaseModel, validate: bool = ...): ...
|
||||
def convert_to_record(self, value, record: BaseModel): ...
|
||||
def convert_to_record_multi(self, values, records: BaseModel): ...
|
||||
def convert_to_read(self, value, record: BaseModel, use_name_get: bool = ...): ...
|
||||
def convert_to_write(self, value, record: BaseModel): ...
|
||||
def convert_to_export(self, value, record: BaseModel) -> str: ...
|
||||
def convert_to_display_name(self, value, record: BaseModel) -> None: ...
|
||||
def get_depends(self, model: BaseModel): ...
|
||||
def create(self, record_values: list[tuple[BaseModel, Any]]) -> None: ...
|
||||
def write(self, records: BaseModel, value): ...
|
||||
def write_batch(self, records_commands_list: _CommandList, create: bool = ...): ...
|
||||
|
||||
class One2many(_RelationalMulti):
|
||||
type: str
|
||||
inverse_name: Any
|
||||
inverse_name: str | None
|
||||
auto_join: bool
|
||||
limit: Any
|
||||
limit: int | None
|
||||
copy: bool
|
||||
def __init__(self, comodel_name=..., inverse_name=..., string=..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
_description_relation_field: Any
|
||||
def update_db(self, model, columns) -> None: ...
|
||||
def get_domain_list(self, records): ...
|
||||
# def __get__(self, records, owner): ...
|
||||
def read(self, records): ...
|
||||
def write_real(self, records_commands_list, create: bool = ...): ...
|
||||
def write_new(self, records_commands_list): ...
|
||||
def __init__(self, comodel_name: str = ..., inverse_name: str = ..., string: str = ..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
_description_relation_field: str | None
|
||||
def update_db(self, model: BaseModel, columns) -> None: ...
|
||||
def get_domain_list(self, records: BaseModel): ...
|
||||
def __get__(self, records: BaseModel, owner) -> BaseModel: ...
|
||||
def read(self, records: BaseModel): ...
|
||||
def write_real(self, records_commands_list: _CommandList, create: bool = ...): ...
|
||||
def write_new(self, records_commands_list: _CommandList): ...
|
||||
|
||||
class Many2many(_RelationalMulti):
|
||||
type: str
|
||||
_explicit: bool
|
||||
relation: Any
|
||||
column1: Any
|
||||
column2: Any
|
||||
relation: str | None
|
||||
column1: str | None
|
||||
column2: str | None
|
||||
auto_join: bool
|
||||
limit: Any
|
||||
ondelete: Any
|
||||
def __init__(self, comodel_name=..., relation=..., column1=..., column2=..., string=..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model) -> None: ...
|
||||
def update_db(self, model, columns) -> None: ...
|
||||
def update_db_foreign_keys(self, model) -> None: ...
|
||||
limit: int | None
|
||||
ondelete: str
|
||||
def __init__(self, comodel_name: str =..., relation: str = ..., column1: str = ..., column2: str = ..., string: str = ..., **kwargs) -> None: ...
|
||||
def setup_nonrelated(self, model: BaseModel) -> None: ...
|
||||
def update_db(self, model: BaseModel, columns) -> None: ...
|
||||
def update_db_foreign_keys(self, model: BaseModel) -> None: ...
|
||||
@property
|
||||
def groupable(self): ...
|
||||
def read(self, records) -> None: ...
|
||||
def write_real(self, records_commands_list, create: bool = ...): ...
|
||||
def write_new(self, records_commands_list): ...
|
||||
def groupable(self) -> bool: ...
|
||||
def read(self, records: BaseModel) -> None: ...
|
||||
def write_real(self, records_commands_list: _CommandList, create: bool = ...): ...
|
||||
def write_new(self, records_commands_list: _CommandList): ...
|
||||
|
||||
class Id(Field):
|
||||
type: str
|
||||
column_type: Any
|
||||
column_type: tuple[str, str]
|
||||
string: str
|
||||
store: bool
|
||||
readonly: bool
|
||||
prefetch: bool
|
||||
def update_db(self, model, columns) -> None: ...
|
||||
def __get__(self, record, owner): ...
|
||||
def __set__(self, record, value) -> None: ...
|
||||
def update_db(self, model: BaseModel, columns) -> None: ...
|
||||
def __get__(self, record: BaseModel, owner): ...
|
||||
def __set__(self, record: BaseModel, value) -> None: ...
|
||||
|
||||
def prefetch_many2one_ids(record, field): ...
|
||||
def prefetch_x2many_ids(record, field): ...
|
||||
def apply_required(model, field_name) -> None: ...
|
||||
def prefetch_many2one_ids(record: BaseModel, field: Field) -> Iterator: ...
|
||||
def prefetch_x2many_ids(record: BaseModel, field: Field) -> Iterator: ...
|
||||
def apply_required(model: BaseModel, field_name: str) -> None: ...
|
||||
|
||||
@@ -1,42 +1,48 @@
|
||||
from typing import Any, Union
|
||||
from logging import Logger
|
||||
from typing import Any, Callable, Generator, Sequence, TypeVar
|
||||
|
||||
import werkzeug.wrappers
|
||||
import werkzeug
|
||||
from werkzeug.datastructures import CombinedMultiDict
|
||||
from werkzeug.exceptions import NotFound
|
||||
from werkzeug.local import LocalStack
|
||||
from werkzeug.routing import Map
|
||||
|
||||
from .api import Environment
|
||||
from .modules.registry import Registry
|
||||
from .sql_db import Cursor
|
||||
from .tools._vendor import sessions
|
||||
|
||||
_logger: Any
|
||||
rpc_request: Any
|
||||
rpc_response: Any
|
||||
STATIC_CACHE: Any
|
||||
STATIC_CACHE_LONG: Any
|
||||
ALLOWED_DEBUG_MODES: Any
|
||||
_request_stack: Any
|
||||
request: Union[HttpRequest, JsonRequest]
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def replace_request_password(args): ...
|
||||
rpc_request: Logger
|
||||
rpc_response: Logger
|
||||
STATIC_CACHE: int
|
||||
STATIC_CACHE_LONG: int
|
||||
ALLOWED_DEBUG_MODES: list[str]
|
||||
_request_stack: LocalStack
|
||||
request: HttpRequest | JsonRequest
|
||||
|
||||
NO_POSTMORTEM: Any
|
||||
def replace_request_password(args) -> tuple: ...
|
||||
|
||||
def dispatch_rpc(service_name, method, params): ...
|
||||
NO_POSTMORTEM: tuple[type[Exception], ...]
|
||||
|
||||
def dispatch_rpc(service_name: str, method: str, params): ...
|
||||
|
||||
class WebRequest:
|
||||
httprequest: werkzeug.wrappers.Request
|
||||
httpresponse: Response
|
||||
httprequest: werkzeug.Request
|
||||
httpresponse: Response | None
|
||||
disable_db: bool
|
||||
endpoint: Any
|
||||
endpoint: EndPoint | None
|
||||
endpoint_arguments: Any
|
||||
auth_method: Any
|
||||
website = Environment['website']
|
||||
lang = Environment['res.lang']
|
||||
_cr: Cursor
|
||||
_uid: int
|
||||
_context: dict
|
||||
_env: Environment
|
||||
_failed: Any
|
||||
def __init__(self, httprequest) -> None: ...
|
||||
auth_method: str | None
|
||||
website: 'odoo.model.website'
|
||||
lang: 'odoo.model.res_lang'
|
||||
_cr: Cursor | None
|
||||
_uid: int | None
|
||||
_context: dict | None
|
||||
_env: Environment | None
|
||||
_failed: Exception | None
|
||||
def __init__(self, httprequest: werkzeug.Request) -> None: ...
|
||||
@property
|
||||
def cr(self) -> Cursor: ...
|
||||
@property
|
||||
@@ -44,73 +50,83 @@ class WebRequest:
|
||||
@uid.setter
|
||||
def uid(self, val) -> None: ...
|
||||
@property
|
||||
def context(self): ...
|
||||
def context(self) -> dict: ...
|
||||
@context.setter
|
||||
def context(self, val) -> None: ...
|
||||
@property
|
||||
def env(self) -> Environment: ...
|
||||
@property
|
||||
def session(self) -> OpenERPSession: ...
|
||||
def __enter__(self): ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
def set_handler(self, endpoint, arguments, auth) -> None: ...
|
||||
def _handle_exception(self, exception) -> None: ...
|
||||
def redirect(self, location, code: int = ..., local: bool = ...): ...
|
||||
def redirect_query(self, location, query: Any | None = ..., code: int = ..., local: bool = ...): ...
|
||||
def _is_cors_preflight(self, endpoint): ...
|
||||
def set_handler(self, endpoint: EndPoint, arguments, auth) -> None: ...
|
||||
def _handle_exception(self, exception: Exception) -> None: ...
|
||||
def redirect(self, location, code: int = ..., local: bool = ...) -> Response: ...
|
||||
def redirect_query(self, location, query: Any | None = ..., code: int = ..., local: bool = ...) -> Response: ...
|
||||
def _is_cors_preflight(self, endpoint: EndPoint) -> bool: ...
|
||||
def _call_function(self, *args, **kwargs): ...
|
||||
def registry_cr(self) -> None: ...
|
||||
def registry_cr(self) -> Generator[tuple[Registry, Cursor], None, None]: ...
|
||||
@property
|
||||
def registry(self) -> Registry: ...
|
||||
@property
|
||||
def db(self): ...
|
||||
def csrf_token(self, time_limit: Any | None = ...): ...
|
||||
def validate_csrf(self, csrf): ...
|
||||
def db(self) -> str | None: ...
|
||||
def csrf_token(self, time_limit: int | None = ...): ...
|
||||
def validate_csrf(self, csrf) -> bool: ...
|
||||
|
||||
def route(route: Any | None = ..., **kw): ...
|
||||
def route(route: str | list[str] | None = ...,
|
||||
type: str = ...,
|
||||
auth: str = ...,
|
||||
methods: list[str] = ...,
|
||||
cors: str = ...,
|
||||
csrf: bool = ...,
|
||||
**kw): ...
|
||||
|
||||
class JsonRequest(WebRequest):
|
||||
_request_type: str
|
||||
params: Any
|
||||
params: dict
|
||||
jsonrequest: Any
|
||||
context: Any
|
||||
context: dict
|
||||
def __init__(self, *args) -> None: ...
|
||||
def _json_response(self, result: Any | None = ..., error: Any | None = ...): ...
|
||||
def _handle_exception(self, exception): ...
|
||||
def dispatch(self): ...
|
||||
def _json_response(self, result: Any | None = ..., error: dict | None = ...) -> Response: ...
|
||||
def _handle_exception(self, exception: Exception) -> Response: ...
|
||||
def dispatch(self) -> Response: ...
|
||||
|
||||
def serialize_exception(e): ...
|
||||
def serialize_exception(e: Exception) -> dict[str, Any]: ...
|
||||
|
||||
class HttpRequest(WebRequest):
|
||||
_request_type: str
|
||||
params: Any
|
||||
params: dict
|
||||
def __init__(self, *args) -> None: ...
|
||||
def _handle_exception(self, exception): ...
|
||||
def _is_cors_preflight(self, endpoint): ...
|
||||
def _handle_exception(self, exception: Exception): ...
|
||||
def _is_cors_preflight(self, endpoint: EndPoint) -> bool: ...
|
||||
def dispatch(self): ...
|
||||
def make_response(self, data, headers: Any | None = ..., cookies: Any | None = ...): ...
|
||||
def render(self, template, qcontext: Any | None = ..., lazy: bool = ..., **kw): ...
|
||||
def not_found(self, description: Any | None = ...): ...
|
||||
def make_response(self, data, headers: list[tuple[str, str]] | None = ..., cookies: dict | None = ...) -> Response: ...
|
||||
def render(self, template, qcontext: dict | None = ..., lazy: bool = ..., **kw) -> Response: ...
|
||||
def not_found(self, description: str | Any | None = ...) -> NotFound: ...
|
||||
|
||||
addons_manifest: Any
|
||||
controllers_per_module: Any
|
||||
addons_manifest: dict
|
||||
controllers_per_module: dict[str, list]
|
||||
|
||||
class ControllerType(type):
|
||||
def __init__(cls, name, bases, attrs) -> None: ...
|
||||
def __init__(cls, name: str, bases: tuple, attrs: dict) -> None: ...
|
||||
|
||||
Controller: Any
|
||||
Controller = ControllerType('Controller', (object,), {})
|
||||
|
||||
class EndPoint:
|
||||
method: Any
|
||||
original: Any
|
||||
routing: Any
|
||||
arguments: Any
|
||||
method: Callable
|
||||
original: Callable
|
||||
routing: dict
|
||||
arguments: dict
|
||||
def __init__(self, method, routing) -> None: ...
|
||||
@property
|
||||
def first_arg_is_req(self): ...
|
||||
def first_arg_is_req(self) -> bool: ...
|
||||
def __call__(self, *args, **kw): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def _as_tuple(self) -> tuple[Callable, dict]: ...
|
||||
def __repr__(self) -> str: ...
|
||||
|
||||
def _generate_routing_rules(modules, nodb_only, converters: Any | None = ...): ...
|
||||
def _generate_routing_rules(modules: Sequence[str], nodb_only: bool, converters: Any | None = ...) -> Generator[tuple[str, EndPoint, dict], None, None]: ...
|
||||
|
||||
class AuthenticationError(Exception): ...
|
||||
class SessionExpiredException(Exception): ...
|
||||
@@ -122,67 +138,68 @@ class OpenERPSession(sessions.Session):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __getattr__(self, attr): ...
|
||||
def __setattr__(self, k, v): ...
|
||||
pre_uid: Any
|
||||
db: Any
|
||||
login: Any
|
||||
def authenticate(self, db, login: Any | None = ..., password: Any | None = ...): ...
|
||||
session_token: Any
|
||||
pre_uid: int
|
||||
db: str
|
||||
login: str | None
|
||||
def authenticate(self, db: str, login: str | None = ..., password: str | None = ...) -> int: ...
|
||||
session_token: str | None
|
||||
def finalize(self) -> None: ...
|
||||
def check_security(self) -> None: ...
|
||||
def logout(self, keep_db: bool = ...) -> None: ...
|
||||
def _default_values(self) -> None: ...
|
||||
context: Any
|
||||
def get_context(self): ...
|
||||
def _fix_lang(self, context) -> None: ...
|
||||
def save_action(self, action): ...
|
||||
def get_action(self, key): ...
|
||||
context: dict
|
||||
def get_context(self) -> dict: ...
|
||||
def _fix_lang(self, context: dict) -> None: ...
|
||||
def save_action(self, action) -> int: ...
|
||||
def get_action(self, key: int): ...
|
||||
def save_request_data(self) -> None: ...
|
||||
def load_request_data(self) -> None: ...
|
||||
def load_request_data(self) -> Generator[CombinedMultiDict | None, None, None]: ...
|
||||
|
||||
def session_gc(session_store) -> None: ...
|
||||
def session_gc(session_store: sessions.FilesystemSessionStore) -> None: ...
|
||||
|
||||
ODOO_DISABLE_SESSION_GC: Any
|
||||
session_gc: Any
|
||||
ODOO_DISABLE_SESSION_GC: bool
|
||||
|
||||
class Response(werkzeug.wrappers.Response):
|
||||
class Response(werkzeug.Response):
|
||||
default_mimetype: str
|
||||
def __init__(self, *args, **kw) -> None: ...
|
||||
template: Any
|
||||
qcontext: Any
|
||||
uid: Any
|
||||
def set_default(self, template: Any | None = ..., qcontext: Any | None = ..., uid: Any | None = ...) -> None: ...
|
||||
qcontext: dict
|
||||
uid: int
|
||||
def set_default(self, template: Any | None = ..., qcontext: dict | None = ..., uid: int | None = ...) -> None: ...
|
||||
@property
|
||||
def is_qweb(self): ...
|
||||
def is_qweb(self) -> bool: ...
|
||||
def render(self): ...
|
||||
def flatten(self) -> None: ...
|
||||
|
||||
class DisableCacheMiddleware:
|
||||
app: Any
|
||||
def __init__(self, app) -> None: ...
|
||||
def __call__(self, environ, start_response): ...
|
||||
app: Callable
|
||||
def __init__(self, app: Callable) -> None: ...
|
||||
def __call__(self, environ: dict, start_response: Callable): ...
|
||||
|
||||
class Root:
|
||||
_loaded: bool
|
||||
def __init__(self) -> None: ...
|
||||
def session_store(self): ...
|
||||
def nodb_routing_map(self): ...
|
||||
def __call__(self, environ, start_response): ...
|
||||
@property
|
||||
def session_store(self) -> sessions.FilesystemSessionStore: ...
|
||||
@property
|
||||
def nodb_routing_map(self) -> Map: ...
|
||||
def __call__(self, environ: dict, start_response: Callable): ...
|
||||
def load_addons(self) -> None: ...
|
||||
def setup_session(self, httprequest): ...
|
||||
def setup_db(self, httprequest) -> None: ...
|
||||
def setup_lang(self, httprequest) -> None: ...
|
||||
def get_request(self, httprequest): ...
|
||||
def get_response(self, httprequest, result, explicit_session): ...
|
||||
def dispatch(self, environ, start_response): ...
|
||||
def get_profiler_context_manager(self, request): ...
|
||||
def get_db_router(self, db): ...
|
||||
def setup_session(self, httprequest: werkzeug.Request) -> bool: ...
|
||||
def setup_db(self, httprequest: werkzeug.Request) -> None: ...
|
||||
def setup_lang(self, httprequest: werkzeug.Request) -> None: ...
|
||||
def get_request(self, httprequest: werkzeug.Request) -> HttpRequest | JsonRequest: ...
|
||||
def get_response(self, httprequest: werkzeug.Request, result, explicit_session: bool) -> Any: ...
|
||||
def set_csp(self, response: werkzeug.Response) -> None: ...
|
||||
def dispatch(self, environ: dict, start_response: Callable): ...
|
||||
def get_profiler_context_manager(self, request: WebRequest): ...
|
||||
def get_db_router(self, db: str) -> Map: ...
|
||||
|
||||
def db_list(force: bool = ..., httprequest: Any | None = ...): ...
|
||||
def db_filter(dbs, httprequest: Any | None = ...): ...
|
||||
def db_monodb(httprequest: Any | None = ...): ...
|
||||
def send_file(filepath_or_fp, mimetype: Any | None = ..., as_attachment: bool = ..., filename: Any | None = ..., mtime: Any | None = ..., add_etags: bool = ..., cache_timeout=..., conditional: bool = ...): ...
|
||||
def content_disposition(filename): ...
|
||||
def db_list(force: bool = ..., httprequest: werkzeug.Request | None = ...) -> list[str]: ...
|
||||
def db_filter(dbs, httprequest: werkzeug.Request | None = ...) -> list[str]: ...
|
||||
def db_monodb(httprequest: werkzeug.Request | None = ...) -> str | None: ...
|
||||
def send_file(filepath_or_fp, mimetype: str | None = ..., as_attachment: bool = ..., filename: str | None = ..., mtime: Any | None = ..., add_etags: bool = ..., cache_timeout: int =..., conditional: bool = ...) -> Response: ...
|
||||
def content_disposition(filename: str) -> str: ...
|
||||
def set_safe_image_headers(headers, content): ...
|
||||
def set_header_field(headers, name, value): ...
|
||||
|
||||
root: Any
|
||||
root: Root
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Generator
|
||||
|
||||
LOG_NOTSET: str
|
||||
LOG_DEBUG: str
|
||||
@@ -7,9 +7,9 @@ LOG_WARNING: str
|
||||
LOG_ERROR: str
|
||||
LOG_CRITICAL: str
|
||||
|
||||
def get_encodings(hint_encoding: str = ...) -> None: ...
|
||||
def get_encodings(hint_encoding: str = ...) -> Generator[str, None, None]: ...
|
||||
|
||||
text_type: Any
|
||||
text_type: type[str]
|
||||
|
||||
def ustr(value, hint_encoding: str = ..., errors: str = ...): ...
|
||||
def exception_to_unicode(e): ...
|
||||
def ustr(value, hint_encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def exception_to_unicode(e: BaseException) -> str: ...
|
||||
|
||||
@@ -1,179 +1,191 @@
|
||||
from collections.abc import MutableMapping
|
||||
from typing import Any, Generator, List, TypeVar
|
||||
from collections import defaultdict
|
||||
from re import Pattern
|
||||
from typing import Any, Callable, Collection, Container, Iterable, Iterator, MutableMapping, Sequence, TypeVar, Union
|
||||
|
||||
import psycopg2
|
||||
from lxml.etree import _Element
|
||||
|
||||
from . import api, fields
|
||||
from .api import Environment
|
||||
from .fields import Field
|
||||
from .modules.registry import Registry
|
||||
from .osv.query import Query
|
||||
from .sql_db import Cursor
|
||||
|
||||
_M = TypeVar('_M')
|
||||
_T = TypeVar('_T')
|
||||
_ModelT = TypeVar('_ModelT', bound=BaseModel)
|
||||
_Domain = list
|
||||
|
||||
_logger: Any
|
||||
_schema: Any
|
||||
_unlink: Any
|
||||
regex_order: Any
|
||||
regex_object_name: Any
|
||||
regex_pg_name: Any
|
||||
regex_field_agg: Any
|
||||
regex_order: Pattern[str]
|
||||
regex_object_name: Pattern[str]
|
||||
regex_pg_name: Pattern[str]
|
||||
regex_field_agg: Pattern[str]
|
||||
AUTOINIT_RECALCULATE_STORED_FIELDS: int
|
||||
|
||||
def check_object_name(name): ...
|
||||
def raise_on_invalid_object_name(name) -> None: ...
|
||||
def check_pg_name(name) -> None: ...
|
||||
def check_object_name(name: str) -> bool: ...
|
||||
def raise_on_invalid_object_name(name: str) -> None: ...
|
||||
def check_pg_name(name: str) -> None: ...
|
||||
|
||||
regex_private: Any
|
||||
regex_private: Pattern[str]
|
||||
|
||||
def check_method_name(name) -> None: ...
|
||||
def same_name(f, g): ...
|
||||
def fix_import_export_id_paths(fieldname): ...
|
||||
def trigger_tree_merge(node1, node2) -> None: ...
|
||||
def check_method_name(name: str) -> None: ...
|
||||
def same_name(f, g) -> bool: ...
|
||||
def fix_import_export_id_paths(fieldname: str) -> list[str]: ...
|
||||
def trigger_tree_merge(node1: dict, node2: dict) -> None: ...
|
||||
|
||||
class MetaModel(api.Meta):
|
||||
module_to_models: Any
|
||||
def __new__(meta, name, bases, attrs): ...
|
||||
def __init__(self, name, bases, attrs) -> None: ...
|
||||
module_to_models: defaultdict[str, list[type[BaseModel]]]
|
||||
def __new__(meta, name: str, bases: tuple, attrs: dict): ...
|
||||
def __init__(self: type[BaseModel], name: str, bases: tuple, attrs: dict) -> None: ...
|
||||
|
||||
class NewId:
|
||||
__slots__: Any
|
||||
origin: Any
|
||||
__slots__: list[str]
|
||||
origin: int | None
|
||||
ref: Any
|
||||
def __init__(self, origin: Any | None = ..., ref: Any | None = ...) -> None: ...
|
||||
def __bool__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __repr__(self): ...
|
||||
def __str__(self): ...
|
||||
def __init__(self, origin: int | None = ..., ref: Any | None = ...) -> None: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
def origin_ids(ids): ...
|
||||
def expand_ids(id0, ids) -> None: ...
|
||||
def origin_ids(ids: Iterable) -> Iterator[int]: ...
|
||||
def expand_ids(id0: _T, ids: Iterable) -> Iterator[_T]: ...
|
||||
|
||||
IdType: Any
|
||||
IdType: tuple[type[int], type[str], type[NewId]]
|
||||
PREFETCH_MAX: int
|
||||
LOG_ACCESS_COLUMNS: Any
|
||||
MAGIC_COLUMNS: Any
|
||||
VALID_AGGREGATE_FUNCTIONS: Any
|
||||
LOG_ACCESS_COLUMNS: list[str]
|
||||
MAGIC_COLUMNS: list[str]
|
||||
VALID_AGGREGATE_FUNCTIONS: set[str]
|
||||
|
||||
def is_definition_class(cls): ...
|
||||
def is_registry_class(cls): ...
|
||||
def is_definition_class(cls) -> bool: ...
|
||||
def is_registry_class(cls) -> bool: ...
|
||||
|
||||
class BaseModel(metaclass=MetaModel):
|
||||
__slots__: Any
|
||||
__slots__: list[str]
|
||||
_auto: bool
|
||||
_register: bool
|
||||
_abstract: bool
|
||||
_transient: bool
|
||||
_name: str
|
||||
_description: str
|
||||
_module: Any
|
||||
_module: str
|
||||
_custom: bool
|
||||
_inherit: Any
|
||||
_inherits: Any
|
||||
_inherit: tuple[str]
|
||||
_inherits: dict[str, str]
|
||||
_table: str
|
||||
_table_query: Any
|
||||
_sequence: Any
|
||||
_sql_constraints: Any
|
||||
_rec_name: str
|
||||
_table_query: str | None
|
||||
_sequence: str | None
|
||||
_sql_constraints: list[tuple[str, str, str]]
|
||||
_rec_name: str | None
|
||||
_order: str
|
||||
_parent_name: str
|
||||
_parent_store: bool
|
||||
_active_name: Any
|
||||
_active_name: str | None
|
||||
_date_name: str
|
||||
_fold_name: str
|
||||
_needaction: bool
|
||||
_translate: bool
|
||||
_check_company_auto: bool
|
||||
_depends: Any
|
||||
_transient_max_count: Any
|
||||
_transient_max_hours: Any
|
||||
_fields: dict[str, fields.Field]
|
||||
_ids: List[int]
|
||||
_prefetch_ids: List[int]
|
||||
_depends: dict[str, Iterable[str]]
|
||||
_transient_max_count: int
|
||||
_transient_max_hours: float
|
||||
_original_module: str
|
||||
_inherit_module: dict[str, str]
|
||||
_inherit_children: set[str]
|
||||
_inherits_children: set[str]
|
||||
_fields: dict[str, Field]
|
||||
_field_definitions: list[Field]
|
||||
_log_access: bool
|
||||
_ids: tuple
|
||||
_prefetch_ids: Iterable[int]
|
||||
__base_classes: tuple[type[BaseModel] | type, ...]
|
||||
env: Environment = ...
|
||||
pool: Registry
|
||||
id = fields.Id()
|
||||
display_name = fields.Char()
|
||||
create_uid = fields.Many2one('res.users')
|
||||
create_date = fields.Datetime()
|
||||
write_uid = fields.Many2one('res.users')
|
||||
write_date = fields.Datetime()
|
||||
display_name = fields.Char(string='Display Name')
|
||||
create_uid = fields.Many2one('res.users', string='Created by')
|
||||
create_date = fields.Datetime(string='Created on')
|
||||
write_uid = fields.Many2one('res.users', string='Last Updated by')
|
||||
write_date = fields.Datetime(string='Last Updated on')
|
||||
CONCURRENCY_CHECK_FIELD: str
|
||||
def view_init(self, fields_list) -> None: ...
|
||||
def _valid_field_parameter(self, field, name): ...
|
||||
def _add_field(self, name, field) -> None: ...
|
||||
def _pop_field(self, name): ...
|
||||
def view_init(self, fields_list: list[str]) -> None: ...
|
||||
def _valid_field_parameter(self, field: Field, name: str) -> bool: ...
|
||||
def _add_field(self, name: str, field: Field) -> None: ...
|
||||
def _pop_field(self, name: str) -> Field: ...
|
||||
def _compute_concurrency_field(self) -> None: ...
|
||||
@classmethod
|
||||
def _build_model(cls, pool, cr): ...
|
||||
def _build_model(cls, pool: Registry, cr: Cursor) -> BaseModel: ...
|
||||
@classmethod
|
||||
def _build_model_check_base(model_class, cls) -> None: ...
|
||||
def _build_model_check_base(model_class, cls: type[BaseModel]) -> None: ...
|
||||
@classmethod
|
||||
def _build_model_check_parent(model_class, cls, parent_class) -> None: ...
|
||||
def _build_model_check_parent(model_class, cls: type[BaseModel], parent_class: type[BaseModel]) -> None: ...
|
||||
@classmethod
|
||||
def _build_model_attributes(cls, pool) -> None: ...
|
||||
def _build_model_attributes(cls, pool: Registry) -> None: ...
|
||||
@classmethod
|
||||
def _init_constraints_onchanges(cls) -> None: ...
|
||||
@property
|
||||
def _constraint_methods(self): ...
|
||||
def _constraint_methods(self) -> list: ...
|
||||
@property
|
||||
def _ondelete_methods(self): ...
|
||||
def _ondelete_methods(self) -> list: ...
|
||||
@property
|
||||
def _onchange_methods(self): ...
|
||||
def _onchange_methods(self) -> dict[str, list]: ...
|
||||
def __new__(cls) -> None: ...
|
||||
def __init__(self, pool, cr) -> None: ...
|
||||
def _is_an_ordinary_table(self): ...
|
||||
def __ensure_xml_id(self, skip: bool = ...): ...
|
||||
def _export_rows(self, fields, *, _is_toplevel_call: bool = ...): ...
|
||||
__export_rows: Any
|
||||
def export_data(self, fields_to_export): ...
|
||||
def load(self, fields, data): ...
|
||||
def _add_fake_fields(self, fields): ...
|
||||
def _extract_records(self, fields_, data, log=..., limit=...): ...
|
||||
def _convert_records(self, records, log=...) -> None: ...
|
||||
def _validate_fields(self, field_names, excluded_names=...) -> None: ...
|
||||
def default_get(self, fields_list): ...
|
||||
def fields_get_keys(self): ...
|
||||
def _rec_name_fallback(self): ...
|
||||
def __init__(self, pool: Registry, cr: Cursor) -> None: ...
|
||||
def _is_an_ordinary_table(self) -> bool: ...
|
||||
def __ensure_xml_id(self: _ModelT, skip: bool = ...) -> Iterator[tuple[_ModelT, str | None]]: ...
|
||||
def _export_rows(self, fields: list[list[str]], *, _is_toplevel_call: bool = ...) -> list[list]: ...
|
||||
__export_rows = _export_rows
|
||||
def export_data(self, fields_to_export: list[str]) -> dict[str, list[list]]: ...
|
||||
def load(self, fields: list[str], data: list[list[str]]) -> dict[str, Any]: ...
|
||||
def _add_fake_fields(self, fields: dict[str | None, Field]) -> dict[str | None, Field]: ...
|
||||
def _extract_records(self, fields_: Iterable[Sequence[str]], data, log: Callable = ..., limit: float = ...) -> Iterator[tuple[BaseModel, dict[str, dict[str, int]]]]: ...
|
||||
def _convert_records(self, records, log: Callable = ...) -> Iterator[tuple[Any, Any, Any, dict]]: ...
|
||||
def _validate_fields(self, field_names: Iterable[str], excluded_names: Iterable[str] = ...) -> None: ...
|
||||
def default_get(self, fields_list: list[str]) -> dict[str, Any]: ...
|
||||
def fields_get_keys(self) -> list[str]: ...
|
||||
def _rec_name_fallback(self) -> str: ...
|
||||
def view_header_get(self, view_id: Any | None = ..., view_type: str = ...): ...
|
||||
def user_has_groups(self, groups): ...
|
||||
def _get_default_form_view(self): ...
|
||||
def _get_default_search_view(self): ...
|
||||
def _get_default_tree_view(self): ...
|
||||
def _get_default_pivot_view(self): ...
|
||||
def _get_default_kanban_view(self): ...
|
||||
def _get_default_graph_view(self): ...
|
||||
def _get_default_calendar_view(self): ...
|
||||
def load_views(self, views, options: Any | None = ...): ...
|
||||
def _fields_view_get(self, view_id: Any | None = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...): ...
|
||||
def fields_view_get(self, view_id: Any | None = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...): ...
|
||||
def get_formview_id(self, access_uid: Any | None = ...): ...
|
||||
def get_formview_action(self, access_uid: Any | None = ...): ...
|
||||
def get_access_action(self, access_uid: Any | None = ...): ...
|
||||
def search_count(self, args) -> int: ...
|
||||
def search(self: _M, args, offset: int = ..., limit: Any | None = ..., order: Any | None = ..., count: bool = ...) -> _M: ...
|
||||
def user_has_groups(self, groups: str) -> bool: ...
|
||||
def _get_default_form_view(self) -> _Element: ...
|
||||
def _get_default_search_view(self) -> _Element: ...
|
||||
def _get_default_tree_view(self) -> _Element: ...
|
||||
def _get_default_pivot_view(self) -> _Element: ...
|
||||
def _get_default_kanban_view(self) -> _Element: ...
|
||||
def _get_default_graph_view(self) -> _Element: ...
|
||||
def _get_default_calendar_view(self) -> _Element: ...
|
||||
def load_views(self, views: list, options: dict | None = ...) -> dict[str, Any]: ...
|
||||
def _fields_view_get(self, view_id: int | None = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...) -> dict[str, Any]: ...
|
||||
def fields_view_get(self, view_id: int | None = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...) -> dict[str, Any]: ...
|
||||
def get_formview_id(self, access_uid: int | None = ...): ...
|
||||
def get_formview_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
|
||||
def get_access_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
|
||||
def search_count(self, args: _Domain) -> int: ...
|
||||
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: bool = ...) -> _ModelT | int: ...
|
||||
def _compute_display_name(self) -> None: ...
|
||||
def name_get(self): ...
|
||||
def name_create(self, name): ...
|
||||
def name_search(self, name: str = ..., args: Any | None = ..., operator: str = ..., limit: int = ...): ...
|
||||
def _name_search(self, name: str = ..., args: Any | None = ..., operator: str = ..., limit: int = ..., name_get_uid: Any | None = ...): ...
|
||||
def _add_missing_default_values(self, values): ...
|
||||
def name_get(self) -> list[tuple[int, str]]: ...
|
||||
def name_create(self, name: str) -> tuple[int, str]: ...
|
||||
def name_search(self, name: str = ..., args: _Domain | None = ..., operator: str = ..., limit: int = ...) -> list[tuple[int, str]]: ...
|
||||
def _name_search(self, name: str = ..., args: _Domain | None = ..., operator: str = ..., limit: int = ..., name_get_uid: int | None = ...) -> list[int]: ...
|
||||
def _add_missing_default_values(self, values: dict[str, Any]) -> dict[str, Any]: ...
|
||||
@classmethod
|
||||
def clear_caches(cls) -> None: ...
|
||||
def _read_group_expand_full(self, groups, domain, order): ...
|
||||
def _read_group_fill_results(self, domain, groupby, remaining_groupbys, aggregated_fields, count_field, read_group_result, read_group_order: Any | None = ...): ...
|
||||
def _read_group_fill_temporal(self, data, groupby, aggregated_fields, annotated_groupbys, fill_from: bool = ..., fill_to: bool = ..., min_groups: bool = ...): ...
|
||||
def _read_group_prepare(self, orderby, aggregated_fields, annotated_groupbys, query): ...
|
||||
def _read_group_process_groupby(self, gb, query): ...
|
||||
def _read_group_prepare_data(self, key, value, groupby_dict): ...
|
||||
def _read_group_format_result(self, data, annotated_groupbys, groupby, domain): ...
|
||||
def read_group(self, domain, fields, groupby, offset: int = ..., limit: Any | None = ..., orderby: bool = ..., lazy: bool = ...): ...
|
||||
def _read_group_raw(self, domain, fields, groupby, offset: int = ..., limit: Any | None = ..., orderby: bool = ..., lazy: bool = ...): ...
|
||||
def _read_group_resolve_many2x_fields(self, data, fields) -> None: ...
|
||||
def _inherits_join_add(self, current_model, parent_model_name, query): ...
|
||||
def _inherits_join_calc(self, alias, fname, query): ...
|
||||
def _read_group_expand_full(self, groups: _ModelT, domain: _Domain | None, order: str | None) -> _ModelT: ...
|
||||
def _read_group_fill_results(self, domain: _Domain, groupby: str, remaining_groupbys: list[str], aggregated_fields: list[str], count_field: str, read_group_result, read_group_order: str | None = ...) -> list: ...
|
||||
def _read_group_fill_temporal(self, data: list, groupby: list[str], aggregated_fields: list[str], annotated_groupbys: list[dict], fill_from: str | None = ..., fill_to: str | None = ..., min_groups: int | None = ...) -> list: ...
|
||||
def _read_group_prepare(self, orderby: str, aggregated_fields: list[str], annotated_groupbys: list[dict], query: Query) -> tuple[list, list]: ...
|
||||
def _read_group_process_groupby(self, gb: str, query: Query) -> dict[str, Any]: ...
|
||||
def _read_group_prepare_data(self, key, value, groupby_dict: dict[str, dict[str, Any]]) -> Any: ...
|
||||
def _read_group_format_result(self, data: dict, annotated_groupbys: list[dict], groupby: list, domain: _Domain) -> dict: ...
|
||||
def read_group(self, domain: _Domain, fields: list[str], groupby: list[str], offset: int = ..., limit: int | None = ..., orderby: str | None = ..., lazy: bool = ...) -> list[dict[str, Any]]: ...
|
||||
def _read_group_raw(self, domain: _Domain, fields: list[str], groupby: list[str], offset: int = ..., limit: int | None = ..., orderby: str | None = ..., lazy: bool = ...) -> list[dict[str, Any]]: ...
|
||||
def _read_group_resolve_many2x_fields(self, data: list[dict[str, Any]], fields: list[dict[str, Any]]) -> None: ...
|
||||
def _inherits_join_add(self, current_model: BaseModel, parent_model_name: str, query: Query) -> str: ...
|
||||
def _inherits_join_calc(self, alias: str, fname: str, query: Query) -> str: ...
|
||||
def _parent_store_compute(self): ...
|
||||
def _check_removed_columns(self, log: bool = ...) -> None: ...
|
||||
def _init_column(self, column_name) -> None: ...
|
||||
def _table_has_rows(self): ...
|
||||
def _init_column(self, column_name: str) -> None: ...
|
||||
def _table_has_rows(self) -> int: ...
|
||||
def _auto_init(self): ...
|
||||
def init(self) -> None: ...
|
||||
def _create_parent_columns(self) -> None: ...
|
||||
@@ -185,145 +197,144 @@ class BaseModel(metaclass=MetaModel):
|
||||
def _setup_base(self) -> None: ...
|
||||
def _setup_fields(self) -> None: ...
|
||||
def _setup_complete(self) -> None: ...
|
||||
def fields_get(self, allfields: Any | None = ..., attributes: Any | None = ...): ...
|
||||
def get_empty_list_help(self, help): ...
|
||||
def check_field_access_rights(self, operation, fields): ...
|
||||
def read(self, fields: list[str] | None = ..., load: str = ...) -> list[dict[str, Any]]: ...
|
||||
def _read_format(self, fnames, load: str = ...): ...
|
||||
def _fetch_field(self, field) -> None: ...
|
||||
def _read(self, fields: list[str]): ...
|
||||
def get_metadata(self): ...
|
||||
def get_base_url(self): ...
|
||||
def fields_get(self, allfields: list[str] | None = ..., attributes: list[str] | None = ...) -> dict[str, dict[str, Any]]: ...
|
||||
def get_empty_list_help(self, help: str) -> str: ...
|
||||
def check_field_access_rights(self, operation: str, fields: Collection[str]): ...
|
||||
def read(self, fields: Collection[str] | None = ..., load: str = ...) -> list[dict[str, Any]]: ...
|
||||
def _read_format(self, fnames: Collection[str], load: str = ...) -> list[dict[str, Any]]: ...
|
||||
def _fetch_field(self, field: Field) -> None: ...
|
||||
def _read(self, fields: Collection[str]): ...
|
||||
def get_metadata(self) -> list[dict[str, Any]]: ...
|
||||
def get_base_url(self) -> str: ...
|
||||
def _check_concurrency(self) -> None: ...
|
||||
def _check_company(self, fnames: Any | None = ...) -> None: ...
|
||||
def check_access_rights(self, operation, raise_exception: bool = ...): ...
|
||||
def check_access_rule(self, operation) -> None: ...
|
||||
def _filter_access_rules(self, operation): ...
|
||||
def _filter_access_rules_python(self, operation): ...
|
||||
def _check_company(self, fnames: Collection[str] | None = ...) -> None: ...
|
||||
def check_access_rights(self, operation: str, raise_exception: bool = ...) -> bool: ...
|
||||
def check_access_rule(self, operation: str) -> None: ...
|
||||
def _filter_access_rules(self: _ModelT, operation: str) -> _ModelT: ...
|
||||
def _filter_access_rules_python(self, operation: str) -> _ModelT: ...
|
||||
def unlink(self): ...
|
||||
def write(self, vals: dict[str, Any]): ...
|
||||
def _write(self, vals: dict[str, Any]): ...
|
||||
def create(self: _M, vals_list: list[dict[str, Any]] | dict[str, Any]) -> _M: ...
|
||||
def _create(self: _M, data_list: list[dict[str, Any]]) -> _M: ...
|
||||
def _compute_field_value(self, field) -> None: ...
|
||||
def create(self: _ModelT, vals_list: list[dict[str, Any]] | dict[str, Any]) -> _ModelT: ...
|
||||
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, vals): ...
|
||||
def _parent_store_update_prepare(self: _ModelT, vals: dict) -> _ModelT: ...
|
||||
def _parent_store_update(self) -> None: ...
|
||||
def _load_records_write(self, values) -> None: ...
|
||||
def _load_records_create(self, values): ...
|
||||
def _load_records(self, data_list, update: bool = ...): ...
|
||||
def _where_calc(self, domain, active_test: bool = ...): ...
|
||||
def _check_qorder(self, word): ...
|
||||
def _apply_ir_rules(self, query, mode: str = ...) -> None: ...
|
||||
def _generate_translated_field(self, table_alias, field, query): ...
|
||||
def _generate_m2o_order_by(self, alias, order_field, query, reverse_direction, seen): ...
|
||||
def _generate_order_by_inner(self, alias, order_spec, query, reverse_direction: bool = ..., seen: Any | None = ...): ...
|
||||
def _generate_order_by(self, order_spec, query): ...
|
||||
def _flush_search(self, domain, fields: Any | None = ..., order: Any | None = ..., seen: Any | None = ...) -> None: ...
|
||||
def _search(self: _M, args, offset: int = ..., limit: Any | None = ..., order: Any | None = ..., count: bool = ..., access_rights_uid: Any | None = ...) -> _M: ...
|
||||
def copy_data(self, default: Any | None = ...): ...
|
||||
def copy_translations(old, new, excluded=...): ...
|
||||
def copy(self: _M, default: Any | None = ...) -> _M: ...
|
||||
def exists(self: _M) -> _M: ...
|
||||
def _check_recursion(self, parent: Any | None = ...): ...
|
||||
def _check_m2m_recursion(self, field_name): ...
|
||||
def _get_external_ids(self): ...
|
||||
def get_external_id(self): ...
|
||||
get_xml_id: Any
|
||||
_get_xml_ids: Any
|
||||
def _load_records_write(self, values: dict[str, Any]) -> None: ...
|
||||
def _load_records_create(self, values: list[dict[str, Any]]): ...
|
||||
def _load_records(self, data_list: list[dict], update: bool = ...) -> BaseModel: ...
|
||||
def _where_calc(self, domain: _Domain, active_test: bool = ...) -> Query: ...
|
||||
def _check_qorder(self, word: str) -> bool: ...
|
||||
def _apply_ir_rules(self, query: Query, mode: str = ...) -> None: ...
|
||||
def _generate_translated_field(self, table_alias: str, field: str, query: Query) -> str: ...
|
||||
def _generate_m2o_order_by(self, alias: str, order_field: str, query: Query, reverse_direction: bool, seen: set | None) -> list[str]: ...
|
||||
def _generate_order_by_inner(self, alias: str, order_spec: str, query: Query, reverse_direction: bool = ..., seen: set | None = ...) -> list[str]: ...
|
||||
def _generate_order_by(self, order_spec: str | None, query: Query) -> str: ...
|
||||
def _flush_search(self, domain: _Domain, fields: Sequence[str] | None = ..., order: str | None = ..., seen: set | None = ...) -> None: ...
|
||||
def _search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: bool = ..., access_rights_uid: int | None = ...) -> Query | int: ...
|
||||
def copy_data(self, default: dict[str, Any] | None = ...) -> list[dict[str, Any]]: ...
|
||||
def copy_translations(old: _ModelT, new: _ModelT, excluded: Container[str] = ...): ...
|
||||
def copy(self: _ModelT, default: dict[str, Any] | None = ...) -> _ModelT: ...
|
||||
def exists(self: _ModelT) -> _ModelT: ...
|
||||
def _check_recursion(self, parent: str | None = ...) -> bool: ...
|
||||
def _check_m2m_recursion(self, field_name: str) -> bool: ...
|
||||
def _get_external_ids(self) -> dict[id, list[str]]: ...
|
||||
def get_external_id(self) -> dict[id, str]: ...
|
||||
get_xml_id = get_external_id
|
||||
_get_xml_ids = _get_external_ids
|
||||
@classmethod
|
||||
def is_transient(cls): ...
|
||||
def search_read(self, domain: Any | None = ..., fields: Any | None = ..., offset: int = ..., limit: Any | None = ..., order: Any | None = ..., **read_kwargs): ...
|
||||
def is_transient(cls) -> bool: ...
|
||||
def search_read(self, domain: _Domain | None = ..., fields: list[str] | None = ..., offset: int = ..., limit: int | None = ..., order: str | None = ..., **read_kwargs: str) -> list[dict[str, Any]]: ...
|
||||
def toggle_active(self) -> None: ...
|
||||
def action_archive(self): ...
|
||||
def action_unarchive(self): ...
|
||||
def _register_hook(self) -> None: ...
|
||||
def _unregister_hook(self) -> None: ...
|
||||
@classmethod
|
||||
def _patch_method(cls, name, method) -> None: ...
|
||||
def _patch_method(cls, name: str, method) -> None: ...
|
||||
@classmethod
|
||||
def _revert_method(cls, name) -> None: ...
|
||||
def _revert_method(cls, name: str) -> None: ...
|
||||
@classmethod
|
||||
def _browse(cls, env, ids, prefetch_ids): ...
|
||||
def browse(self: _M, ids: Any | None = ...) -> _M: ...
|
||||
def _browse(cls: type[_ModelT], env: Environment, ids: tuple, prefetch_ids: Iterable[int]) -> _ModelT: ...
|
||||
def browse(self: _ModelT, ids: int | NewId | Iterable[int | NewId] | None = ...) -> _ModelT: ...
|
||||
@property
|
||||
def ids(self) -> list[int]: ...
|
||||
_cr: Cursor
|
||||
_uid: int
|
||||
_context: dict
|
||||
def ensure_one(self: _M) -> _M: ...
|
||||
def with_env(self: _M, env) -> _M: ...
|
||||
def sudo(self: _M, flag: bool = ...) -> _M: ...
|
||||
def with_user(self: _M, user) -> _M: ...
|
||||
def with_company(self: _M, company) -> _M: ...
|
||||
def with_context(self: _M, *args, **kwargs) -> _M: ...
|
||||
def with_prefetch(self: _M, prefetch_ids: Any | None = ...) -> _M: ...
|
||||
def _update_cache(self, values, validate: bool = ...): ...
|
||||
def _convert_to_record(self, values): ...
|
||||
def ensure_one(self: _ModelT) -> _ModelT: ...
|
||||
def with_env(self: _ModelT, env: Environment) -> _ModelT: ...
|
||||
def sudo(self: _ModelT, flag: bool = ...) -> _ModelT: ...
|
||||
def with_user(self: _ModelT, user: Union['odoo.model.res_partner', int]) -> _ModelT: ...
|
||||
def with_company(self: _ModelT, company: Union['odoo.model.res_company', int]) -> _ModelT: ...
|
||||
def with_context(self: _ModelT, *args, **kwargs) -> _ModelT: ...
|
||||
def with_prefetch(self: _ModelT, prefetch_ids: Iterable[int] | None = ...) -> _ModelT: ...
|
||||
def _update_cache(self, values: dict[str, Any], validate: bool = ...): ...
|
||||
def _convert_to_record(self, values: dict[str, Any]): ...
|
||||
def _convert_to_write(self, values: dict[str, Any]) -> dict[str, Any]: ...
|
||||
def _mapped_func(self, func): ...
|
||||
def mapped(self, func): ...
|
||||
def _mapped_cache(self, name_seq): ...
|
||||
def filtered(self: _M, func) -> _M: ...
|
||||
def filtered_domain(self: _M, domain) -> _M: ...
|
||||
def sorted(self: _M, key: Any | None = ..., reverse: bool = ...) -> _M: ...
|
||||
def update(self, values) -> None: ...
|
||||
def flush(self, fnames: Any | None = ..., records: Any | None = ...) -> None: ...
|
||||
def new(self: _M, values=..., origin: Any | None = ..., ref: Any | None = ...) -> _M: ...
|
||||
def _mapped_func(self, func: Callable): ...
|
||||
def mapped(self, func: Callable | str): ...
|
||||
def _mapped_cache(self, name_seq: str): ...
|
||||
def filtered(self: _ModelT, func: Callable | str) -> _ModelT: ...
|
||||
def filtered_domain(self: _ModelT, domain: _Domain) -> _ModelT: ...
|
||||
def sorted(self: _ModelT, key: Callable | str | None = ..., reverse: bool = ...) -> _ModelT: ...
|
||||
def update(self, values: dict[str, Any]) -> None: ...
|
||||
def flush(self, fnames: Collection[str] | None = ..., records: BaseModel | None = ...) -> None: ...
|
||||
def new(self: _ModelT, values=..., origin: _ModelT | None = ..., ref: Any | None = ...) -> _ModelT: ...
|
||||
@property
|
||||
def _origin(self: _M) -> _M: ...
|
||||
def _origin(self: _ModelT) -> _ModelT: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
__nonzero__: Any
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self: _M) -> Generator[_M]: ...
|
||||
def __contains__(self, item) -> bool: ...
|
||||
def __add__(self: _M, other) -> _M: ...
|
||||
def concat(self: _M, *args) -> _M: ...
|
||||
def __sub__(self: _M, other) -> _M: ...
|
||||
def __and__(self: _M, other) -> _M: ...
|
||||
def __or__(self: _M, other) -> _M: ...
|
||||
def union(self: _M, *args) -> _M: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __iter__(self: _ModelT) -> Iterator[_ModelT]: ...
|
||||
def __contains__(self: _ModelT, item: _ModelT | str) -> bool: ...
|
||||
def __add__(self: _ModelT, other: _ModelT) -> _ModelT: ...
|
||||
def concat(self: _ModelT, *args: _ModelT) -> _ModelT: ...
|
||||
def __sub__(self: _ModelT, other: _ModelT) -> _ModelT: ...
|
||||
def __and__(self: _ModelT, other: _ModelT) -> _ModelT: ...
|
||||
def __or__(self: _ModelT, other: _ModelT) -> _ModelT: ...
|
||||
def union(self: _ModelT, *args: _ModelT) -> _ModelT: ...
|
||||
def __eq__(self: _ModelT, other: _ModelT) -> bool: ...
|
||||
def __lt__(self: _ModelT, other: _ModelT) -> bool: ...
|
||||
def __le__(self: _ModelT, other: _ModelT) -> bool: ...
|
||||
def __gt__(self: _ModelT, other: _ModelT) -> bool: ...
|
||||
def __ge__(self: _ModelT, other: _ModelT) -> bool: ...
|
||||
def __int__(self): ...
|
||||
def __repr__(self): ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __getitem__(self, key): ...
|
||||
def __setitem__(self, key, value): ...
|
||||
def __getitem__(self, key: str | int | slice): ...
|
||||
def __setitem__(self, key: str, value): ...
|
||||
@property
|
||||
def _cache(self): ...
|
||||
def _in_cache_without(self, field, limit=...): ...
|
||||
def _cache(self) -> RecordCache: ...
|
||||
def _in_cache_without(self: _ModelT, field: Field, limit: int = ...) -> _ModelT: ...
|
||||
def refresh(self) -> None: ...
|
||||
def invalidate_cache(self, fnames: Any | None = ..., ids: Any | None = ...): ...
|
||||
def modified(self, fnames, create: bool = ..., before: bool = ...) -> None: ...
|
||||
def _modified_triggers(self, tree, create: bool = ...): ...
|
||||
def recompute(self, fnames: Any | None = ..., records: Any | None = ...) -> None: ...
|
||||
def _dependent_fields(self, field): ...
|
||||
def _has_onchange(self, field, other_fields): ...
|
||||
def _onchange_spec(self, view_info: Any | None = ...): ...
|
||||
def _onchange_eval(self, field_name, onchange, result) -> None: ...
|
||||
def onchange(self, values, field_name, field_onchange): ...
|
||||
def _get_placeholder_filename(self, field): ...
|
||||
def _populate_factories(self): ...
|
||||
def invalidate_cache(self, fnames: Collection[str] | None = ..., ids: Any | None = ...): ...
|
||||
def modified(self, fnames: Collection[str], create: bool = ..., before: bool = ...) -> None: ...
|
||||
def _modified_triggers(self: _ModelT, tree: dict[Field | None, Any], create: bool = ...) -> Iterator[tuple[Field, _ModelT, bool]]: ...
|
||||
def recompute(self, fnames: Collection[str] | None = ..., records: Union[BaseModel, None] = ...) -> None: ...
|
||||
def _dependent_fields(self, field: Field) -> Iterator[Field]: ...
|
||||
def _has_onchange(self, field: Field, other_fields: Container[Field]) -> bool: ...
|
||||
def _onchange_spec(self, view_info: dict | None = ...) -> dict: ...
|
||||
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]): ...
|
||||
def _get_placeholder_filename(self, field: str) -> str | bool: ...
|
||||
def _populate_factories(self) -> list[tuple[str, Iterator]]: ...
|
||||
@property
|
||||
def _populate_sizes(self): ...
|
||||
def _populate_sizes(self) -> dict[str, int]: ...
|
||||
@property
|
||||
def _populate_dependencies(self): ...
|
||||
def _populate(self, size): ...
|
||||
def _populate_dependencies(self) -> list[str]: ...
|
||||
def _populate(self: _ModelT, size: str) -> _ModelT: ...
|
||||
|
||||
class RecordCache(MutableMapping):
|
||||
__slots__: Any
|
||||
_record: Any
|
||||
def __init__(self, record) -> None: ...
|
||||
def __contains__(self, name): ...
|
||||
def __getitem__(self, name): ...
|
||||
def __setitem__(self, name, value) -> None: ...
|
||||
def __delitem__(self, name) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __len__(self): ...
|
||||
_record: BaseModel
|
||||
def __init__(self, record: BaseModel) -> None: ...
|
||||
def __contains__(self, name: str) -> bool: ...
|
||||
def __getitem__(self, name: str) -> Any: ...
|
||||
def __setitem__(self, name: str, value: Any) -> None: ...
|
||||
def __delitem__(self, name: str) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
AbstractModel = BaseModel
|
||||
|
||||
class Model(AbstractModel):
|
||||
@@ -338,14 +349,14 @@ class TransientModel(Model):
|
||||
_abstract: bool
|
||||
_transient: bool
|
||||
def _transient_vacuum(self) -> None: ...
|
||||
def _transient_clean_old_rows(self, max_count) -> None: ...
|
||||
def _transient_clean_old_rows(self, max_count: int) -> None: ...
|
||||
def _transient_clean_rows_older_than(self, seconds) -> None: ...
|
||||
|
||||
def itemgetter_tuple(items): ...
|
||||
def convert_pgerror_not_null(model, fields, info, e): ...
|
||||
def convert_pgerror_unique(model, fields, info, e): ...
|
||||
def convert_pgerror_constraint(model, fields, info, e): ...
|
||||
def itemgetter_tuple(items) -> Callable[..., tuple]: ...
|
||||
def convert_pgerror_not_null(model: BaseModel, fields: dict[str, dict[str, Any]], info, e: psycopg2.Error) -> dict[str, str]: ...
|
||||
def convert_pgerror_unique(model: BaseModel, fields: dict[str, dict[str, Any]], info, e: psycopg2.Error) -> dict[str, str]: ...
|
||||
def convert_pgerror_constraint(model: BaseModel, fields: dict[str, dict[str, Any]], info, e: psycopg2.Error) -> dict[str, str]: ...
|
||||
|
||||
PGERROR_TO_OE: Any
|
||||
PGERROR_TO_OE: dict[str, Callable]
|
||||
|
||||
def lazy_name_get(self): ...
|
||||
def lazy_name_get(self: BaseModel) -> list[tuple[int, str]]: ...
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
from . import db as db, graph as graph, loading as loading, migration as migration, module as module, registry as registry
|
||||
from odoo.modules.loading import load_modules as load_modules, reset_modules_state as reset_modules_state
|
||||
from odoo.modules.module import adapt_version as adapt_version, check_resource_path as check_resource_path, get_module_path as get_module_path, get_module_resource as get_module_resource, get_modules as get_modules, get_modules_with_version as get_modules_with_version, get_resource_from_path as get_resource_from_path, get_resource_path as get_resource_path, initialize_sys_path as initialize_sys_path, load_information_from_description_file as load_information_from_description_file, load_openerp_module as load_openerp_module
|
||||
from . import (
|
||||
db as db,
|
||||
graph as graph,
|
||||
loading as loading,
|
||||
migration as migration,
|
||||
module as module,
|
||||
registry as registry
|
||||
)
|
||||
from .loading import (
|
||||
load_modules as load_modules,
|
||||
reset_modules_state as reset_modules_state
|
||||
)
|
||||
from .module import (
|
||||
adapt_version as adapt_version,
|
||||
check_resource_path as check_resource_path,
|
||||
get_module_path as get_module_path,
|
||||
get_module_resource as get_module_resource,
|
||||
get_modules as get_modules,
|
||||
get_modules_with_version as get_modules_with_version,
|
||||
get_resource_from_path as get_resource_from_path,
|
||||
get_resource_path as get_resource_path,
|
||||
initialize_sys_path as initialize_sys_path,
|
||||
load_information_from_description_file as load_information_from_description_file,
|
||||
load_openerp_module as load_openerp_module
|
||||
)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
from typing import Any
|
||||
from ..sql_db import Cursor
|
||||
|
||||
_logger: Any
|
||||
|
||||
def is_initialized(cr): ...
|
||||
def initialize(cr) -> None: ...
|
||||
def create_categories(cr, categories): ...
|
||||
def has_unaccent(cr): ...
|
||||
def has_trigram(cr): ...
|
||||
def is_initialized(cr: Cursor) -> bool: ...
|
||||
def initialize(cr: Cursor) -> None: ...
|
||||
def create_categories(cr: Cursor, categories: list[str]) -> int | None: ...
|
||||
def has_unaccent(cr: Cursor) -> bool: ...
|
||||
def has_trigram(cr: Cursor) -> bool: ...
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
from typing import Any
|
||||
from typing import Any, Iterable, Iterator
|
||||
|
||||
_logger: Any
|
||||
from ..sql_db import Cursor
|
||||
|
||||
class Graph(dict):
|
||||
def add_node(self, name, info): ...
|
||||
def update_from_db(self, cr) -> None: ...
|
||||
def add_module(self, cr, module, force: Any | None = ...) -> None: ...
|
||||
def add_modules(self, cr, module_list, force: Any | None = ...): ...
|
||||
def __iter__(self): ...
|
||||
def __str__(self): ...
|
||||
class Graph(dict[str, Node]):
|
||||
def add_node(self, name: str, info: dict[str, Any]) -> Node: ...
|
||||
def update_from_db(self, cr: Cursor) -> None: ...
|
||||
def add_module(self, cr: Cursor, module: str, force: list | None = ...) -> None: ...
|
||||
def add_modules(self, cr: Cursor, module_list: list[str], force: list | None = ...): ...
|
||||
def __iter__(self) -> Iterator[Node]: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class Node:
|
||||
def __new__(cls, name, graph, info): ...
|
||||
name: Any
|
||||
graph: Any
|
||||
info: Any
|
||||
children: Any
|
||||
def __new__(cls, name: str, graph: Graph, info: dict[str, Any]) -> Node: ...
|
||||
id: int
|
||||
name: str
|
||||
graph: Graph
|
||||
info: dict[str, Any]
|
||||
children: list[Node]
|
||||
depth: int
|
||||
def __init__(self, name, graph, info) -> None: ...
|
||||
dbdemo: bool
|
||||
state: str
|
||||
installed_version: str
|
||||
def __init__(self, name: str, graph: Graph, info: dict[str, Any] | None) -> None: ...
|
||||
@property
|
||||
def data(self): ...
|
||||
def add_child(self, name, info): ...
|
||||
def __setattr__(self, name, value) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __str__(self): ...
|
||||
def _pprint(self, depth: int = ...): ...
|
||||
def should_have_demo(self): ...
|
||||
def data(self) -> dict[str, Any]: ...
|
||||
def add_child(self, name: str, info: dict[str, Any]): ...
|
||||
def __setattr__(self, name: str, value) -> None: ...
|
||||
def __iter__(self) -> Iterator[Node]: ...
|
||||
def __str__(self) -> str: ...
|
||||
def _pprint(self, depth: int = ...) -> str: ...
|
||||
def should_have_demo(self) -> bool: ...
|
||||
@property
|
||||
def parents(self): ...
|
||||
def parents(self) -> Iterable[Node]: ...
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
from typing import Any
|
||||
from typing import Any, Iterable
|
||||
|
||||
_logger: Any
|
||||
_test_logger: Any
|
||||
from .graph import Graph, Node
|
||||
from .registry import Registry
|
||||
from ..sql_db import Cursor
|
||||
from ..tests.runner import OdooTestResult
|
||||
|
||||
def load_data(cr, idref, mode, kind, package): ...
|
||||
def load_demo(cr, package, idref, mode): ...
|
||||
def force_demo(cr) -> None: ...
|
||||
def load_module_graph(cr, graph, status: Any | None = ..., perform_checks: bool = ..., skip_modules: Any | None = ..., report: Any | None = ..., models_to_check: Any | None = ...): ...
|
||||
def _check_module_names(cr, module_names) -> None: ...
|
||||
def load_marked_modules(cr, graph, states, force, progressdict, report, loaded_modules, perform_checks, models_to_check: Any | None = ...): ...
|
||||
def load_modules(registry, force_demo: bool = ..., status: Any | None = ..., update_module: bool = ...): ...
|
||||
def reset_modules_state(db_name) -> None: ...
|
||||
def load_data(cr: Cursor, idref: dict, mode: str, kind: str, package: Node) -> bool: ...
|
||||
def load_demo(cr: Cursor, package: Node, idref: dict, mode: str) -> bool: ...
|
||||
def force_demo(cr: Cursor) -> None: ...
|
||||
def load_module_graph(cr: Cursor, graph: Graph, status: Any | None = ..., perform_checks: Any = ..., skip_modules: list[str] | None = ...,
|
||||
report: OdooTestResult | None = ..., models_to_check: set[str] | None = ...) -> tuple[list[str], list[str]]: ...
|
||||
def _check_module_names(cr: Cursor, module_names: Iterable[str]) -> None: ...
|
||||
def load_marked_modules(cr: Cursor, graph: Graph, states: list[str], force: list[str], progressdict, report: OdooTestResult,
|
||||
loaded_modules: list[str], perform_checks: Any, models_to_check: set[str] | None = ...) -> list[str]: ...
|
||||
def load_modules(registry: Registry, force_demo: bool = ..., status: Any | None = ..., update_module: Any = ...) -> Registry | None: ...
|
||||
def reset_modules_state(db_name: str) -> None: ...
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from typing import Any
|
||||
from types import ModuleType
|
||||
|
||||
_logger: Any
|
||||
from .graph import Graph, Node
|
||||
from ..sql_db import Cursor
|
||||
|
||||
def load_script(path, module_name): ...
|
||||
def load_script(path: str, module_name: str) -> ModuleType: ...
|
||||
|
||||
class MigrationManager:
|
||||
cr: Any
|
||||
graph: Any
|
||||
migrations: Any
|
||||
def __init__(self, cr, graph) -> None: ...
|
||||
def _get_files(self): ...
|
||||
def migrate_module(self, pkg, stage): ...
|
||||
cr: Cursor
|
||||
graph: Graph
|
||||
migrations: dict
|
||||
def __init__(self, cr: Cursor, graph: Graph) -> None: ...
|
||||
def _get_files(self) -> None: ...
|
||||
def migrate_module(self, pkg: Node, stage: str) -> None: ...
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
from typing import Any
|
||||
from types import ModuleType
|
||||
from typing import Any, Literal, MutableSequence
|
||||
|
||||
MANIFEST_NAMES: Any
|
||||
README: Any
|
||||
_logger: Any
|
||||
MANIFEST_NAMES: tuple[str, ...]
|
||||
README: list[str]
|
||||
|
||||
def ad_paths(): ...
|
||||
def ad_paths() -> MutableSequence[str]: ...
|
||||
|
||||
loaded: Any
|
||||
loaded: list
|
||||
|
||||
class AddonsHook:
|
||||
def find_module(self, name, path: Any | None = ...): ...
|
||||
def load_module(self, name): ...
|
||||
def find_module(self, name: str, path: Any | None = ...) -> AddonsHook | None: ...
|
||||
def load_module(self, name: str) -> ModuleType | None: ...
|
||||
|
||||
class OdooHook:
|
||||
def find_module(self, name, path: Any | None = ...): ...
|
||||
def load_module(self, name): ...
|
||||
def find_module(self, name: str, path: Any | None = ...) -> OdooHook | None: ...
|
||||
def load_module(self, name: str) -> ModuleType | None: ...
|
||||
|
||||
class UpgradeHook:
|
||||
def find_module(self, name, path: Any | None = ...): ...
|
||||
def load_module(self, name): ...
|
||||
def find_module(self, name: str, path: Any | None = ...) -> UpgradeHook | None: ...
|
||||
def load_module(self, name: str) -> ModuleType | None: ...
|
||||
|
||||
def initialize_sys_path() -> None: ...
|
||||
def get_module_path(module, downloaded: bool = ..., display_warning: bool = ...): ...
|
||||
def get_module_filetree(module, dir: str = ...): ...
|
||||
def get_resource_path(module, *args): ...
|
||||
def check_resource_path(mod_path, *args): ...
|
||||
def get_module_path(module: str, downloaded: bool = ..., display_warning: bool = ...) -> str | Literal[False]: ...
|
||||
def get_module_filetree(module: str, dir: str = ...) -> dict: ...
|
||||
def get_resource_path(module: str, *args) -> str | Literal[False]: ...
|
||||
def check_resource_path(mod_path: str, *args) -> str | Literal[False]: ...
|
||||
get_module_resource = get_resource_path
|
||||
|
||||
def get_resource_from_path(path): ...
|
||||
def get_module_icon(module): ...
|
||||
def module_manifest(path): ...
|
||||
def read_manifest(addons_path, module): ...
|
||||
def get_module_root(path): ...
|
||||
def load_information_from_description_file(module, mod_path: Any | None = ...): ...
|
||||
def load_openerp_module(module_name) -> None: ...
|
||||
def get_modules(): ...
|
||||
def get_modules_with_version(): ...
|
||||
def adapt_version(version): ...
|
||||
def get_resource_from_path(path: str) -> tuple[str, str, str] | None: ...
|
||||
def get_module_icon(module: str) -> str: ...
|
||||
def module_manifest(path: str) -> str | None: ...
|
||||
def read_manifest(addons_path: str, module: str): ...
|
||||
def get_module_root(path: str) -> str | None: ...
|
||||
def load_information_from_description_file(module: str, mod_path: str | None = ...) -> dict: ...
|
||||
def load_openerp_module(module_name: str) -> None: ...
|
||||
def get_modules() -> list[str]: ...
|
||||
def get_modules_with_version() -> dict[str, Any]: ...
|
||||
def adapt_version(version: str) -> str: ...
|
||||
|
||||
current_test: Any
|
||||
|
||||
@@ -1,89 +1,97 @@
|
||||
import threading
|
||||
from collections import deque
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
from threading import RLock
|
||||
from typing import Any, Callable, ClassVar, Iterable, Iterator
|
||||
|
||||
from ..sql_db import Cursor
|
||||
|
||||
_logger: Any
|
||||
_schema: Any
|
||||
from .graph import Node
|
||||
from ..models import BaseModel
|
||||
from ..fields import Field
|
||||
from ..sql_db import Connection, Cursor
|
||||
from ..tests.runner import OdooTestResult
|
||||
from ..tools import Collector
|
||||
from ..tools.lru import LRU
|
||||
|
||||
class Registry(Mapping):
|
||||
_lock: Any
|
||||
_saved_lock: Any
|
||||
def registries(cls): ...
|
||||
def __new__(cls, db_name): ...
|
||||
_lock: RLock
|
||||
_saved_lock: RLock | None
|
||||
registries: ClassVar[LRU]
|
||||
def __new__(cls, db_name: str) -> Registry: ...
|
||||
@classmethod
|
||||
def new(cls, db_name, force_demo: bool = ..., status: Any | None = ..., update_module: bool = ...): ...
|
||||
models: Any
|
||||
_sql_constraints: Any
|
||||
def new(cls, db_name: str, force_demo: bool = ..., status: Any | None = ..., update_module: bool = ...) -> Registry: ...
|
||||
models: dict[str, type[BaseModel]]
|
||||
_sql_constraints: set
|
||||
_init: bool
|
||||
_assertion_report: Any
|
||||
_assertion_report: OdooTestResult
|
||||
_fields_by_model: Any
|
||||
_ordinary_tables: Any
|
||||
_constraint_queue: Any
|
||||
__cache: Any
|
||||
_init_modules: Any
|
||||
updated_modules: Any
|
||||
loaded_xmlids: Any
|
||||
db_name: Any
|
||||
_db: Any
|
||||
test_cr: Any
|
||||
test_lock: Any
|
||||
_constraint_queue: deque
|
||||
__cache: LRU
|
||||
_init_modules: set[str]
|
||||
updated_modules: list[str]
|
||||
loaded_xmlids: set
|
||||
db_name: str
|
||||
_db: Connection
|
||||
test_cr: Cursor | None
|
||||
test_lock: RLock | None
|
||||
loaded: bool
|
||||
ready: bool
|
||||
field_depends: Any
|
||||
field_depends_context: Any
|
||||
field_inverses: Any
|
||||
field_depends: Collector
|
||||
field_depends_context: Collector
|
||||
field_inverses: Collector
|
||||
registry_sequence: Any
|
||||
cache_sequence: Any
|
||||
_invalidation_flags: Any
|
||||
has_unaccent: Any
|
||||
has_trigram: Any
|
||||
def init(self, db_name) -> None: ...
|
||||
_invalidation_flags: threading.local
|
||||
has_unaccent: bool
|
||||
has_trigram: bool
|
||||
def init(self, db_name: str) -> None: ...
|
||||
@classmethod
|
||||
def delete(cls, db_name) -> None: ...
|
||||
def delete(cls, db_name: str) -> None: ...
|
||||
@classmethod
|
||||
def delete_all(cls) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __getitem__(self, model_name): ...
|
||||
def __call__(self, model_name): ...
|
||||
def __setitem__(self, model_name, model) -> None: ...
|
||||
def __delitem__(self, model_name) -> None: ...
|
||||
def descendants(self, model_names, *kinds): ...
|
||||
def load(self, cr, module): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __getitem__(self, model_name: str) -> type[BaseModel]: ...
|
||||
def __call__(self, model_name: str) -> type[BaseModel]: ...
|
||||
def __setitem__(self, model_name: str, model: type[BaseModel]) -> None: ...
|
||||
def __delitem__(self, model_name: str) -> None: ...
|
||||
def descendants(self, model_names: Iterable[str], *kinds) -> set[str]: ...
|
||||
def load(self, cr: Cursor, module: Node) -> set[str]: ...
|
||||
_m2m: Any
|
||||
def setup_models(self, cr) -> None: ...
|
||||
def field_computed(self): ...
|
||||
def field_triggers(self): ...
|
||||
def post_init(self, func, *args, **kwargs) -> None: ...
|
||||
def post_constraint(self, func, *args, **kwargs) -> None: ...
|
||||
def setup_models(self, cr: Cursor) -> None: ...
|
||||
@property
|
||||
def field_computed(self) -> dict[Field, list[Field]]: ...
|
||||
@property
|
||||
def field_triggers(self) -> dict: ...
|
||||
def post_init(self, func: Callable, *args, **kwargs) -> None: ...
|
||||
def post_constraint(self, func: Callable, *args, **kwargs) -> None: ...
|
||||
def finalize_constraints(self) -> None: ...
|
||||
_post_init_queue: Any
|
||||
_post_init_queue: deque
|
||||
_foreign_keys: Any
|
||||
_is_install: Any
|
||||
def init_models(self, cr, model_names, context, install: bool = ...) -> None: ...
|
||||
def check_indexes(self, cr, model_names) -> None: ...
|
||||
_is_install: bool
|
||||
def init_models(self, cr: Cursor, model_names: Iterable[str], context: dict, install: bool = ...) -> None: ...
|
||||
def check_indexes(self, cr: Cursor, model_names: Iterable[str]) -> None: ...
|
||||
def add_foreign_key(self, table1, column1, table2, column2, ondelete, model, module, force: bool = ...) -> None: ...
|
||||
def check_foreign_keys(self, cr) -> None: ...
|
||||
def check_tables_exist(self, cr) -> None: ...
|
||||
def check_foreign_keys(self, cr: Cursor) -> None: ...
|
||||
def check_tables_exist(self, cr: Cursor) -> None: ...
|
||||
def _clear_cache(self) -> None: ...
|
||||
def clear_caches(self) -> None: ...
|
||||
def is_an_ordinary_table(self, model): ...
|
||||
def is_an_ordinary_table(self, model: BaseModel) -> bool: ...
|
||||
@property
|
||||
def registry_invalidated(self): ...
|
||||
def registry_invalidated(self) -> bool: ...
|
||||
@registry_invalidated.setter
|
||||
def registry_invalidated(self, value) -> None: ...
|
||||
def registry_invalidated(self, value: bool) -> None: ...
|
||||
@property
|
||||
def cache_invalidated(self): ...
|
||||
def cache_invalidated(self) -> bool: ...
|
||||
@cache_invalidated.setter
|
||||
def cache_invalidated(self, value) -> None: ...
|
||||
def cache_invalidated(self, value: bool) -> None: ...
|
||||
def setup_signaling(self) -> None: ...
|
||||
def check_signaling(self): ...
|
||||
def check_signaling(self) -> Registry: ...
|
||||
def signal_changes(self) -> None: ...
|
||||
def reset_changes(self) -> None: ...
|
||||
def manage_changes(self) -> None: ...
|
||||
def in_test_mode(self): ...
|
||||
def enter_test_mode(self, cr) -> None: ...
|
||||
def in_test_mode(self) -> bool: ...
|
||||
def enter_test_mode(self, cr: Cursor) -> None: ...
|
||||
def leave_test_mode(self) -> None: ...
|
||||
def cursor(self) -> Cursor: ...
|
||||
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
import logging.handlers
|
||||
from typing import Any
|
||||
import warnings
|
||||
from logging import Logger, LogRecord
|
||||
from typing import TextIO
|
||||
|
||||
_logger: Any
|
||||
|
||||
def log(logger, level, prefix, msg, depth: Any | None = ...) -> None: ...
|
||||
def log(logger: Logger, level: int, prefix: str, msg, depth: int | None = ...) -> None: ...
|
||||
|
||||
class PostgreSQLHandler(logging.Handler):
|
||||
def emit(self, record) -> None: ...
|
||||
def emit(self, record: LogRecord) -> None: ...
|
||||
|
||||
BLACK: Any
|
||||
RED: Any
|
||||
GREEN: Any
|
||||
YELLOW: Any
|
||||
BLUE: Any
|
||||
MAGENTA: Any
|
||||
CYAN: Any
|
||||
WHITE: Any
|
||||
_NOTHING: Any
|
||||
DEFAULT: Any
|
||||
BLACK: int
|
||||
RED: int
|
||||
GREEN: int
|
||||
YELLOW: int
|
||||
BLUE: int
|
||||
MAGENTA: int
|
||||
CYAN: int
|
||||
WHITE: int
|
||||
_NOTHING: int
|
||||
DEFAULT: int
|
||||
RESET_SEQ: str
|
||||
COLOR_SEQ: str
|
||||
BOLD_SEQ: str
|
||||
COLOR_PATTERN: Any
|
||||
LEVEL_COLOR_MAPPING: Any
|
||||
COLOR_PATTERN: str
|
||||
LEVEL_COLOR_MAPPING: dict[int, tuple[int, int]]
|
||||
|
||||
class PerfFilter(logging.Filter):
|
||||
def format_perf(self, query_count, query_time, remaining_time): ...
|
||||
def filter(self, record): ...
|
||||
def format_perf(self, query_count: int, query_time: float, remaining_time: float): ...
|
||||
def filter(self, record: LogRecord): ...
|
||||
|
||||
class ColoredPerfFilter(PerfFilter):
|
||||
def format_perf(self, query_count, query_time, remaining_time): ...
|
||||
def format_perf(self, query_count: int, query_time: float, remaining_time: float): ...
|
||||
|
||||
class DBFormatter(logging.Formatter):
|
||||
def format(self, record): ...
|
||||
def format(self, record: LogRecord): ...
|
||||
|
||||
class ColoredFormatter(DBFormatter):
|
||||
def format(self, record): ...
|
||||
def format(self, record: LogRecord): ...
|
||||
|
||||
_logger_init: bool
|
||||
|
||||
def init_logger(): ...
|
||||
|
||||
DEFAULT_LOG_CONFIGURATION: Any
|
||||
PSEUDOCONFIG_MAPPER: Any
|
||||
showwarning: Any
|
||||
IGNORE: Any
|
||||
DEFAULT_LOG_CONFIGURATION: list[str]
|
||||
PSEUDOCONFIG_MAPPER: dict[str, list[str]]
|
||||
showwarning = warnings.showwarning
|
||||
IGNORE: set[str]
|
||||
|
||||
def showwarning_with_traceback(message, category, filename, lineno, file: Any | None = ..., line: Any | None = ...): ...
|
||||
def showwarning_with_traceback(message: Warning | str, category: type[Warning], filename: str, lineno: int, file: TextIO | None = ..., line: str | None = ...): ...
|
||||
def runbot(self, message, *args, **kws) -> None: ...
|
||||
|
||||
@@ -1,44 +1,49 @@
|
||||
from ..models import MAGIC_COLUMNS as MAGIC_COLUMNS
|
||||
from functools import partial as partial
|
||||
from odoo.tools.misc import get_lang as get_lang
|
||||
from typing import Any
|
||||
from typing import Any, Callable
|
||||
|
||||
from .query import Query
|
||||
from ..models import BaseModel, MAGIC_COLUMNS as MAGIC_COLUMNS
|
||||
from ..sql_db import Cursor
|
||||
from ..tools.misc import get_lang as get_lang
|
||||
|
||||
_Domain = list
|
||||
|
||||
NOT_OPERATOR: str
|
||||
OR_OPERATOR: str
|
||||
AND_OPERATOR: str
|
||||
DOMAIN_OPERATORS: Any
|
||||
TERM_OPERATORS: Any
|
||||
NEGATIVE_TERM_OPERATORS: Any
|
||||
DOMAIN_OPERATORS_NEGATION: Any
|
||||
TERM_OPERATORS_NEGATION: Any
|
||||
TRUE_LEAF: Any
|
||||
FALSE_LEAF: Any
|
||||
TRUE_DOMAIN: Any
|
||||
FALSE_DOMAIN: Any
|
||||
_logger: Any
|
||||
DOMAIN_OPERATORS: tuple[str, ...]
|
||||
TERM_OPERATORS: tuple[str, ...]
|
||||
NEGATIVE_TERM_OPERATORS: tuple[str, ...]
|
||||
DOMAIN_OPERATORS_NEGATION: dict[str, str]
|
||||
TERM_OPERATORS_NEGATION: dict[str, str]
|
||||
TRUE_LEAF: tuple
|
||||
FALSE_LEAF: tuple
|
||||
TRUE_DOMAIN: list[tuple]
|
||||
FALSE_DOMAIN: list[tuple]
|
||||
|
||||
def normalize_domain(domain): ...
|
||||
def is_false(model, domain): ...
|
||||
def combine(operator, unit, zero, domains): ...
|
||||
def AND(domains): ...
|
||||
def OR(domains): ...
|
||||
def distribute_not(domain): ...
|
||||
def _quote(to_quote): ...
|
||||
def normalize_domain(domain: _Domain) -> _Domain: ...
|
||||
def is_false(model, domain: _Domain) -> bool: ...
|
||||
def combine(operator: str, unit, zero, domains: list[_Domain]) -> _Domain: ...
|
||||
def AND(domains: list[_Domain]) -> _Domain: ...
|
||||
def OR(domains: list[_Domain]) -> _Domain: ...
|
||||
def distribute_not(domain: _Domain) -> _Domain: ...
|
||||
def _quote(to_quote: str) -> str: ...
|
||||
def normalize_leaf(element): ...
|
||||
def is_operator(element): ...
|
||||
def is_leaf(element, internal: bool = ...): ...
|
||||
def is_boolean(element): ...
|
||||
def is_operator(element) -> bool: ...
|
||||
def is_leaf(element, internal: bool = ...) -> bool: ...
|
||||
def is_boolean(element) -> bool: ...
|
||||
def check_leaf(element, internal: bool = ...) -> None: ...
|
||||
def get_unaccent_wrapper(cr): ...
|
||||
def get_unaccent_wrapper(cr: Cursor) -> Callable[[Any], str]: ...
|
||||
|
||||
class expression:
|
||||
_unaccent: Any
|
||||
root_model: Any
|
||||
root_alias: Any
|
||||
expression: Any
|
||||
query: Any
|
||||
def __init__(self, domain, model, alias: Any | None = ..., query: Any | None = ...) -> None: ...
|
||||
def get_tables(self): ...
|
||||
_unaccent: Callable[[Any], str]
|
||||
root_model: BaseModel
|
||||
root_alias: str | None
|
||||
expression: _Domain
|
||||
query: Query | None
|
||||
result: tuple[str, list]
|
||||
def __init__(self, domain: _Domain, model: BaseModel, alias: str | None = ..., query: Query | None = ...) -> None: ...
|
||||
def get_tables(self) -> tuple[str, ...]: ...
|
||||
def parse(self): ...
|
||||
def __leaf_to_sql(self, leaf, model, alias): ...
|
||||
def to_sql(self): ...
|
||||
def __leaf_to_sql(self, leaf, model: BaseModel, alias: str) -> tuple[str, list]: ...
|
||||
def to_sql(self) -> tuple[str, list]: ...
|
||||
|
||||
@@ -1,37 +1,41 @@
|
||||
from typing import Any
|
||||
from re import Pattern
|
||||
from typing import Iterable, Iterator
|
||||
|
||||
IDENT_RE: Any
|
||||
from ..sql_db import Cursor
|
||||
|
||||
def _from_table(table, alias): ...
|
||||
def _generate_table_alias(src_table_alias, link): ...
|
||||
IDENT_RE: Pattern
|
||||
|
||||
def _from_table(table: str, alias: str) -> str: ...
|
||||
def _generate_table_alias(src_table_alias: str, link: str) -> str: ...
|
||||
|
||||
class Query:
|
||||
_cr: Any
|
||||
_tables: Any
|
||||
_joins: Any
|
||||
_where_clauses: Any
|
||||
_where_params: Any
|
||||
order: Any
|
||||
limit: Any
|
||||
offset: Any
|
||||
def __init__(self, cr, alias, table: Any | None = ...) -> None: ...
|
||||
def add_table(self, alias, table: Any | None = ...) -> None: ...
|
||||
def add_where(self, where_clause, where_params=...) -> None: ...
|
||||
def join(self, lhs_alias, lhs_column, rhs_table, rhs_column, link, extra: Any | None = ..., extra_params=...): ...
|
||||
def left_join(self, lhs_alias, lhs_column, rhs_table, rhs_column, link, extra: Any | None = ..., extra_params=...): ...
|
||||
def _join(self, kind, lhs_alias, lhs_column, rhs_table, rhs_column, link, extra: Any | None = ..., extra_params=...): ...
|
||||
def select(self, *args): ...
|
||||
def subselect(self, *args): ...
|
||||
def get_sql(self): ...
|
||||
def _result(self): ...
|
||||
def __str__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
_cr: Cursor
|
||||
_tables: dict[str, str]
|
||||
_joins: dict[str, tuple]
|
||||
_where_clauses: list[str]
|
||||
_where_params: list
|
||||
order: str | None
|
||||
limit: int | None
|
||||
offset: int | None
|
||||
def __init__(self, cr: Cursor, alias: str, table: str | None = ...) -> None: ...
|
||||
def add_table(self, alias: str, table: str | None = ...) -> None: ...
|
||||
def add_where(self, where_clause: str, where_params: Iterable = ...) -> None: ...
|
||||
def join(self, lhs_alias: str, lhs_column: str, rhs_table: str, rhs_column: str, link: str, extra: str | None = ..., extra_params: tuple = ...) -> str: ...
|
||||
def left_join(self, lhs_alias: str, lhs_column: str, rhs_table: str, rhs_column: str, link: str, extra: str | None = ..., extra_params: tuple = ...) -> str: ...
|
||||
def _join(self, kind: str, lhs_alias: str, lhs_column: str, rhs_table: str, rhs_column: str, link: str, extra: str | None = ..., extra_params: tuple = ...) -> str: ...
|
||||
def select(self, *args) -> tuple[str, list]: ...
|
||||
def subselect(self, *args) -> tuple[str, list]: ...
|
||||
def get_sql(self) -> tuple[str, str, list]: ...
|
||||
@property
|
||||
def tables(self): ...
|
||||
def _result(self) -> list: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator: ...
|
||||
@property
|
||||
def where_clause(self): ...
|
||||
def tables(self) -> tuple[str, ...]: ...
|
||||
@property
|
||||
def where_clause_params(self): ...
|
||||
def add_join(self, connection, implicit: bool = ..., outer: bool = ..., extra: Any | None = ..., extra_params=...): ...
|
||||
def where_clause(self) -> tuple[str, ...]: ...
|
||||
@property
|
||||
def where_clause_params(self) -> tuple: ...
|
||||
def add_join(self, connection, implicit: bool = ..., outer: bool = ..., extra: str | None = ..., extra_params: tuple = ...) -> tuple[str, str]: ...
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
from typing import Any
|
||||
|
||||
RELEASE_LEVELS: Any
|
||||
ALPHA: Any
|
||||
BETA: Any
|
||||
RELEASE_CANDIDATE: Any
|
||||
FINAL: Any
|
||||
RELEASE_LEVELS_DISPLAY: Any
|
||||
version_info: Any
|
||||
version: Any
|
||||
series: Any
|
||||
serie: Any
|
||||
major_version: Any
|
||||
RELEASE_LEVELS: list[str]
|
||||
ALPHA: str
|
||||
BETA: str
|
||||
RELEASE_CANDIDATE: str
|
||||
FINAL: str
|
||||
RELEASE_LEVELS_DISPLAY: dict[str, str]
|
||||
version_info: tuple
|
||||
version: str
|
||||
series: str
|
||||
serie: str
|
||||
major_version: str
|
||||
product_name: str
|
||||
description: str
|
||||
long_desc: str
|
||||
@@ -19,4 +17,4 @@ url: str
|
||||
author: str
|
||||
author_email: str
|
||||
license: str
|
||||
nt_service_name: Any
|
||||
nt_service_name: str
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from typing import Any, TypeVar
|
||||
from datetime import datetime
|
||||
from re import Pattern
|
||||
from threading import Lock, RLock
|
||||
from typing import Any, Callable, Iterable, Iterator, Literal, NoReturn, Sequence, TypeVar
|
||||
|
||||
import psycopg2.extensions
|
||||
|
||||
@@ -6,113 +9,115 @@ from .api import Transaction
|
||||
from .tools import Callbacks
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_CursorT = TypeVar('_CursorT', bound=Cursor)
|
||||
|
||||
_logger: Any
|
||||
def unbuffer(symb, cr: Cursor): ...
|
||||
def undecimalize(symb, cr: Cursor): ...
|
||||
def adapt_string(adapted: str) -> psycopg2.extensions.QuotedString: ...
|
||||
def flush_env(cr: Cursor, *, clear: bool = ...) -> None: ...
|
||||
def clear_env(cr: Cursor) -> None: ...
|
||||
|
||||
def unbuffer(symb, cr): ...
|
||||
def undecimalize(symb, cr): ...
|
||||
def adapt_string(adapted): ...
|
||||
def flush_env(cr, *, clear: bool = ...) -> None: ...
|
||||
def clear_env(cr) -> None: ...
|
||||
|
||||
re_from: Any
|
||||
re_into: Any
|
||||
re_from: Pattern
|
||||
re_into: Pattern
|
||||
sql_counter: int
|
||||
|
||||
def check(f, self, *args, **kwargs): ...
|
||||
def check(f: Callable[..., _T], self: Cursor, *args, **kwargs) -> _T: ...
|
||||
|
||||
class BaseCursor:
|
||||
precommit: Callbacks
|
||||
postcommit: Callbacks
|
||||
prerollback: Callbacks
|
||||
postrollback: Callbacks
|
||||
transaction: Transaction
|
||||
transaction: Transaction | None
|
||||
def __init__(self) -> None: ...
|
||||
def execute(self, query, *args, **kwargs): ...
|
||||
def commit(self): ...
|
||||
def rollback(self): ...
|
||||
def close(self): ...
|
||||
def flush(self) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def savepoint(self, flush: bool = ...) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self: _CursorT) -> _CursorT: ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
|
||||
class Cursor(BaseCursor):
|
||||
IN_MAX: int
|
||||
sql_from_log: Any
|
||||
sql_into_log: Any
|
||||
sql_log: Any
|
||||
sql_from_log: dict
|
||||
sql_into_log: dict
|
||||
sql_log: bool
|
||||
sql_log_count: int
|
||||
_closed: bool
|
||||
__pool: Any
|
||||
dbname: Any
|
||||
_serialized: Any
|
||||
_cnx: Any
|
||||
_obj: Any
|
||||
__caller: Any
|
||||
__pool: ConnectionPool
|
||||
dbname: str
|
||||
_serialized: bool
|
||||
_cnx: PsycoConnection
|
||||
_obj: psycopg2.extensions.cursor
|
||||
__caller: tuple[str, int | str] | Literal[False]
|
||||
_default_log_exceptions: bool
|
||||
cache: Any
|
||||
_now: Any
|
||||
def __init__(self, pool, dbname, dsn, serialized: bool = ...) -> None: ...
|
||||
def __build_dict(self, row): ...
|
||||
def dictfetchone(self): ...
|
||||
def dictfetchmany(self, size): ...
|
||||
def dictfetchall(self): ...
|
||||
cache: dict
|
||||
_now: datetime | None
|
||||
def __init__(self, pool: ConnectionPool, dbname: str, dsn: dict, serialized: bool = ...) -> None: ...
|
||||
def __build_dict(self, row: Sequence) -> dict[str, Any]: ...
|
||||
def dictfetchone(self) -> dict[str, Any] | None: ...
|
||||
def dictfetchmany(self, size) -> list[dict[str, Any]]: ...
|
||||
def dictfetchall(self) -> list[dict[str, Any]]: ...
|
||||
def __del__(self) -> None: ...
|
||||
def _format(self, query, params: Any | None = ...): ...
|
||||
def execute(self, query, params: Any | None = ..., log_exceptions: Any | None = ...): ...
|
||||
def split_for_in_conditions(self, ids, size: Any | None = ...): ...
|
||||
def split_for_in_conditions(self, ids: Iterable, size: int | None = ...) -> Iterator[tuple]: ...
|
||||
def print_log(self): ...
|
||||
def close(self): ...
|
||||
def _close(self, leak: bool = ...) -> None: ...
|
||||
def autocommit(self, on) -> None: ...
|
||||
def after(self, event, func) -> None: ...
|
||||
def autocommit(self, on: bool) -> None: ...
|
||||
def after(self, event: str, func: Callable) -> None: ...
|
||||
def commit(self): ...
|
||||
def rollback(self): ...
|
||||
def __getattr__(self, name): ...
|
||||
def __getattr__(self, name: str): ...
|
||||
@property
|
||||
def closed(self): ...
|
||||
def now(self): ...
|
||||
def closed(self) -> bool: ...
|
||||
def now(self) -> datetime: ...
|
||||
|
||||
class TestCursor(BaseCursor):
|
||||
_savepoint_seq: Any
|
||||
_savepoint_seq: Iterator[int]
|
||||
_closed: bool
|
||||
_cursor: Any
|
||||
_lock: Any
|
||||
_savepoint: Any
|
||||
def __init__(self, cursor, lock) -> None: ...
|
||||
_cursor: Cursor
|
||||
_lock: RLock
|
||||
_savepoint: str
|
||||
def __init__(self, cursor: Cursor, lock: RLock) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def autocommit(self, on) -> None: ...
|
||||
def autocommit(self, on: bool) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
def rollback(self) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
def __getattr__(self, name: str): ...
|
||||
|
||||
class PsycoConnection(psycopg2.extensions.connection): ...
|
||||
|
||||
class ConnectionPool:
|
||||
def locked(fun): ...
|
||||
_connections: Any
|
||||
_maxconn: Any
|
||||
_lock: Any
|
||||
def locked(fun: Callable) -> Callable: ...
|
||||
_connections: list[tuple[psycopg2.extensions.connection, bool]]
|
||||
_maxconn: int
|
||||
_lock: Lock
|
||||
def __init__(self, maxconn: int = ...) -> None: ...
|
||||
def __repr__(self): ...
|
||||
def __repr__(self) -> str: ...
|
||||
def _debug(self, msg, *args) -> None: ...
|
||||
def borrow(self, connection_info): ...
|
||||
def give_back(self, connection, keep_in_pool: bool = ...) -> None: ...
|
||||
def close_all(self, dsn: Any | None = ...) -> None: ...
|
||||
def borrow(self, connection_info: dict) -> PsycoConnection: ...
|
||||
def give_back(self, connection: PsycoConnection, keep_in_pool: bool = ...) -> None: ...
|
||||
def close_all(self, dsn: dict | None = ...) -> None: ...
|
||||
|
||||
class Connection:
|
||||
dbname: Any
|
||||
dsn: Any
|
||||
__pool: Any
|
||||
def __init__(self, pool, dbname, dsn) -> None: ...
|
||||
def cursor(self, serialized: bool = ...): ...
|
||||
serialized_cursor: Any
|
||||
def __bool__(self) -> None: ...
|
||||
__nonzero__: Any
|
||||
dbname: str
|
||||
dsn: dict
|
||||
__pool: ConnectionPool
|
||||
def __init__(self, pool: ConnectionPool, dbname: str, dsn: dict) -> None: ...
|
||||
def cursor(self, serialized: bool = ...) -> Cursor: ...
|
||||
serialized_cursor = cursor
|
||||
def __bool__(self) -> NoReturn: ...
|
||||
|
||||
def connection_info_for(db_or_uri): ...
|
||||
def connection_info_for(db_or_uri: str) -> tuple[str, dict]: ...
|
||||
|
||||
_Pool: Any
|
||||
_Pool: ConnectionPool | None
|
||||
|
||||
def db_connect(to, allow_uri: bool = ...): ...
|
||||
def close_db(db_name) -> None: ...
|
||||
def db_connect(to: str, allow_uri: bool = ...) -> Connection: ...
|
||||
def close_db(db_name: str) -> None: ...
|
||||
def close_all() -> None: ...
|
||||
|
||||
@@ -10,7 +10,20 @@ from .xml_utils import *
|
||||
from .date_utils import *
|
||||
from .convert import *
|
||||
from .template_inheritance import *
|
||||
from . import _monkeypatches as _monkeypatches, appdirs as appdirs, cloc as cloc, osutil as osutil, pdf as pdf, pycompat as pycompat, win32 as win32
|
||||
from . import (
|
||||
_monkeypatches as _monkeypatches,
|
||||
appdirs as appdirs,
|
||||
cloc as cloc,
|
||||
osutil as osutil,
|
||||
pdf as pdf,
|
||||
pycompat as pycompat,
|
||||
win32 as win32
|
||||
)
|
||||
from .config import config as config
|
||||
from .js_transpiler import ODOO_MODULE_RE as ODOO_MODULE_RE, URL_RE as URL_RE, is_odoo_module as is_odoo_module, transpile_javascript as transpile_javascript
|
||||
from .js_transpiler import (
|
||||
ODOO_MODULE_RE as ODOO_MODULE_RE,
|
||||
URL_RE as URL_RE,
|
||||
is_odoo_module as is_odoo_module,
|
||||
transpile_javascript as transpile_javascript
|
||||
)
|
||||
from .sourcemap_generator import SourceMapGenerator as SourceMapGenerator
|
||||
|
||||
@@ -1,38 +1,36 @@
|
||||
from typing import Any
|
||||
from typing import Callable
|
||||
|
||||
__version_info__: Any
|
||||
__version__: Any
|
||||
__version_info__: tuple
|
||||
__version__: str
|
||||
|
||||
def user_data_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., roaming: bool = ...): ...
|
||||
def site_data_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., multipath: bool = ...): ...
|
||||
def user_config_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., roaming: bool = ...): ...
|
||||
def site_config_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., multipath: bool = ...): ...
|
||||
def user_cache_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., opinion: bool = ...): ...
|
||||
def user_log_dir(appname: Any | None = ..., appauthor: Any | None = ..., version: Any | None = ..., opinion: bool = ...): ...
|
||||
def user_data_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...) -> str: ...
|
||||
def site_data_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...) -> str: ...
|
||||
def user_config_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...) -> str: ...
|
||||
def site_config_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...) -> str: ...
|
||||
def user_cache_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...) -> str: ...
|
||||
def user_log_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...) -> str: ...
|
||||
|
||||
class AppDirs:
|
||||
appname: Any
|
||||
appauthor: Any
|
||||
version: Any
|
||||
roaming: Any
|
||||
multipath: Any
|
||||
def __init__(self, appname, appauthor: Any | None = ..., version: Any | None = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
||||
appname: str
|
||||
appauthor: str | None
|
||||
version: str | None
|
||||
roaming: bool
|
||||
multipath: bool
|
||||
def __init__(self, appname: str, appauthor: str | None = ..., version: str | None = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
||||
@property
|
||||
def user_data_dir(self): ...
|
||||
def user_data_dir(self) -> str: ...
|
||||
@property
|
||||
def site_data_dir(self): ...
|
||||
def site_data_dir(self) -> str: ...
|
||||
@property
|
||||
def user_config_dir(self): ...
|
||||
def user_config_dir(self) -> str: ...
|
||||
@property
|
||||
def site_config_dir(self): ...
|
||||
def site_config_dir(self) -> str: ...
|
||||
@property
|
||||
def user_cache_dir(self): ...
|
||||
def user_cache_dir(self) -> str: ...
|
||||
@property
|
||||
def user_log_dir(self): ...
|
||||
def user_log_dir(self) -> str: ...
|
||||
|
||||
def _get_win_folder_from_registry(csidl_name): ...
|
||||
def _get_win_folder_with_pywin32(csidl_name): ...
|
||||
def _get_win_folder_with_ctypes(csidl_name): ...
|
||||
_get_win_folder = _get_win_folder_with_pywin32
|
||||
_get_win_folder = _get_win_folder_with_ctypes
|
||||
_get_win_folder = _get_win_folder_from_registry
|
||||
def _get_win_folder_from_registry(csidl_name: str) -> str: ...
|
||||
def _get_win_folder_with_pywin32(csidl_name: str) -> str: ...
|
||||
def _get_win_folder_with_ctypes(csidl_name: str) -> str: ...
|
||||
_get_win_folder: Callable[[str], str]
|
||||
|
||||
@@ -1,30 +1,32 @@
|
||||
from typing import Any
|
||||
from collections import defaultdict
|
||||
from typing import Any, Callable
|
||||
|
||||
from .lru import LRU
|
||||
from ..models import BaseModel
|
||||
|
||||
unsafe_eval = eval
|
||||
_logger: Any
|
||||
|
||||
class ormcache_counter:
|
||||
__slots__: Any
|
||||
hit: int
|
||||
miss: int
|
||||
err: int
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def ratio(self): ...
|
||||
def ratio(self) -> float: ...
|
||||
|
||||
STAT: Any
|
||||
STAT: defaultdict[Any, ormcache_counter]
|
||||
|
||||
class ormcache:
|
||||
args: Any
|
||||
skiparg: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
method: Any
|
||||
def __call__(self, method): ...
|
||||
method: Callable
|
||||
def __call__(self, method: Callable): ...
|
||||
key: Any
|
||||
def determine_key(self): ...
|
||||
def lru(self, model): ...
|
||||
def lookup(self, method, *args, **kwargs): ...
|
||||
def clear(self, model, *args) -> None: ...
|
||||
def lru(self, model: BaseModel) -> tuple[LRU, tuple[str, Callable], ormcache_counter]: ...
|
||||
def lookup(self, method: Callable, *args, **kwargs): ...
|
||||
def clear(self, model: BaseModel, *args) -> None: ...
|
||||
|
||||
class ormcache_context(ormcache):
|
||||
keys: Any
|
||||
@@ -38,7 +40,7 @@ class ormcache_multi(ormcache):
|
||||
key_multi: Any
|
||||
multi_pos: Any
|
||||
def determine_key(self) -> None: ...
|
||||
def lookup(self, method, *args, **kwargs): ...
|
||||
def lookup(self, method: Callable, *args, **kwargs): ...
|
||||
|
||||
class dummy_cache:
|
||||
def __init__(self, *l, **kw) -> None: ...
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
from typing import Any
|
||||
|
||||
from ..api import Environment
|
||||
|
||||
VERSION: int
|
||||
DEFAULT_EXCLUDE: Any
|
||||
STANDARD_MODULES: Any
|
||||
MAX_FILE_SIZE: Any
|
||||
DEFAULT_EXCLUDE: list[str]
|
||||
STANDARD_MODULES: list[str]
|
||||
MAX_FILE_SIZE: int
|
||||
VALID_EXTENSION: list[str]
|
||||
|
||||
class Cloc:
|
||||
modules: Any
|
||||
code: Any
|
||||
total: Any
|
||||
errors: Any
|
||||
modules: dict
|
||||
code: dict
|
||||
total: dict
|
||||
errors: dict
|
||||
excluded: dict
|
||||
max_width: int
|
||||
def __init__(self) -> None: ...
|
||||
def parse_xml(self, s): ...
|
||||
def parse_py(self, s): ...
|
||||
def parse_js(self, s): ...
|
||||
def book(self, module, item: str = ..., count=...) -> None: ...
|
||||
def count_path(self, path, exclude: Any | None = ...) -> None: ...
|
||||
def count_modules(self, env) -> None: ...
|
||||
def count_customization(self, env) -> None: ...
|
||||
def count_env(self, env) -> None: ...
|
||||
def parse_c_like(self, s: str, regex: str) -> tuple[int, int]: ...
|
||||
def parse_xml(self, s: str) -> tuple[int, int]: ...
|
||||
def parse_py(self, s: str) -> tuple[int, int]: ...
|
||||
def parse_js(self, s: str) -> tuple[int, int]: ...
|
||||
def parse_scss(self, s: str) -> tuple[int, int]: ...
|
||||
def parse_css(self, s: str) -> tuple[int, int]: ...
|
||||
def parse(self, s: str, ext: str) -> tuple[int, int]: ...
|
||||
def book(self, module: str, item: str = ..., count: tuple[Any, Any] = ..., exclude: bool = ...) -> None: ...
|
||||
def count_path(self, path: str, exclude: set[str] | None = ...) -> None: ...
|
||||
def count_modules(self, env: Environment) -> None: ...
|
||||
def count_customization(self, env: Environment) -> None: ...
|
||||
def count_env(self, env: Environment) -> None: ...
|
||||
def count_database(self, database) -> None: ...
|
||||
def report(self, verbose: bool = ..., width: Any | None = ...): ...
|
||||
def report(self, verbose: bool = ..., width: float | None = ...): ...
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
import optparse
|
||||
from optparse import Option, OptionParser
|
||||
from typing import Any
|
||||
|
||||
crypt_context: Any
|
||||
from passlib.context import CryptContext
|
||||
|
||||
class MyOption(optparse.Option):
|
||||
crypt_context: CryptContext
|
||||
|
||||
class MyOption(Option):
|
||||
my_default: Any
|
||||
def __init__(self, *opts, **attrs) -> None: ...
|
||||
|
||||
DEFAULT_LOG_HANDLER: str
|
||||
|
||||
def _get_default_datadir(): ...
|
||||
def _deduplicate_loggers(loggers): ...
|
||||
def _get_default_datadir() -> str: ...
|
||||
def _deduplicate_loggers(loggers) -> tuple[str, ...]: ...
|
||||
|
||||
class configmanager:
|
||||
options: Any
|
||||
blacklist_for_save: Any
|
||||
casts: Any
|
||||
misc: Any
|
||||
config_file: Any
|
||||
_LOGLEVELS: Any
|
||||
parser: Any
|
||||
def __init__(self, fname: Any | None = ...) -> None: ...
|
||||
def parse_config(self, args: Any | None = ...): ...
|
||||
rcfile: Any
|
||||
def _parse_config(self, args: Any | None = ...): ...
|
||||
options: dict[str, Any]
|
||||
blacklist_for_save: set[str]
|
||||
casts: dict
|
||||
misc: dict
|
||||
config_file: str
|
||||
_LOGLEVELS: dict
|
||||
parser: OptionParser
|
||||
def __init__(self, fname: str | None = ...) -> None: ...
|
||||
def parse_config(self, args: list | None = ...): ...
|
||||
rcfile: str
|
||||
def _parse_config(self, args: list | None = ...): ...
|
||||
def _warn_deprecated_options(self) -> None: ...
|
||||
def _is_addons_path(self, path): ...
|
||||
def _check_addons_path(self, option, opt, value, parser) -> None: ...
|
||||
def _check_upgrade_path(self, option, opt, value, parser) -> None: ...
|
||||
def _is_upgrades_path(self, res): ...
|
||||
def _test_enable_callback(self, option, opt, value, parser) -> None: ...
|
||||
def _is_addons_path(self, path: str) -> bool: ...
|
||||
def _check_addons_path(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||
def _check_upgrade_path(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||
def _is_upgrades_path(self, res: str) -> bool: ...
|
||||
def _test_enable_callback(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||
def load(self) -> None: ...
|
||||
def save(self) -> None: ...
|
||||
def get(self, key, default: Any | None = ...): ...
|
||||
@@ -38,12 +40,12 @@ class configmanager:
|
||||
def __setitem__(self, key, value) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
@property
|
||||
def addons_data_dir(self): ...
|
||||
def addons_data_dir(self) -> str: ...
|
||||
@property
|
||||
def session_dir(self): ...
|
||||
def filestore(self, dbname): ...
|
||||
def session_dir(self) -> str: ...
|
||||
def filestore(self, dbname: str) -> str: ...
|
||||
def set_admin_password(self, new_password) -> None: ...
|
||||
def verify_admin_password(self, password): ...
|
||||
def _normalize(self, path): ...
|
||||
def verify_admin_password(self, password) -> bool: ...
|
||||
def _normalize(self, path: str) -> str: ...
|
||||
|
||||
config: Any
|
||||
config: configmanager
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
from .misc import ustr as ustr
|
||||
from odoo import api as api
|
||||
from typing import Any
|
||||
from io import BufferedReader
|
||||
from typing import Any, Callable, TextIO
|
||||
|
||||
__all__: Any
|
||||
_logger: Any
|
||||
safe_eval: Any
|
||||
from lxml.etree import _Element
|
||||
|
||||
from .misc import ustr as ustr
|
||||
from ..api import Environment
|
||||
from ..sql_db import Cursor
|
||||
|
||||
__all__ = [
|
||||
'convert_file', 'convert_sql_import',
|
||||
'convert_csv_import', 'convert_xml_import'
|
||||
]
|
||||
|
||||
safe_eval: Callable
|
||||
|
||||
class ParseError(Exception): ...
|
||||
|
||||
@@ -13,42 +21,42 @@ class RecordDictWrapper(dict):
|
||||
def __init__(self, record) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
|
||||
def _get_idref(self, env, model_str, idref): ...
|
||||
def _fix_multiple_roots(node) -> None: ...
|
||||
def _eval_xml(self, node, env): ...
|
||||
def str2bool(value): ...
|
||||
def nodeattr2bool(node, attr, default: bool = ...): ...
|
||||
def _get_idref(self, env: Environment, model_str: str, idref: dict) -> dict: ...
|
||||
def _fix_multiple_roots(node: _Element) -> None: ...
|
||||
def _eval_xml(self, node: _Element, env: Environment): ...
|
||||
def str2bool(value) -> bool: ...
|
||||
def nodeattr2bool(node: _Element, attr, default: bool = ...) -> bool: ...
|
||||
|
||||
class xml_import:
|
||||
def get_env(self, node, eval_context: Any | None = ...): ...
|
||||
def make_xml_id(self, xml_id): ...
|
||||
def _test_xml_id(self, xml_id) -> None: ...
|
||||
def _tag_delete(self, rec) -> None: ...
|
||||
def _tag_report(self, rec): ...
|
||||
def _tag_function(self, rec) -> None: ...
|
||||
def _tag_act_window(self, rec) -> None: ...
|
||||
def _tag_menuitem(self, rec, parent: Any | None = ...) -> None: ...
|
||||
def _tag_record(self, rec): ...
|
||||
def _tag_template(self, el): ...
|
||||
def id_get(self, id_str, raise_if_not_found: bool = ...): ...
|
||||
def model_id_get(self, id_str, raise_if_not_found: bool = ...): ...
|
||||
def _tag_root(self, el) -> None: ...
|
||||
def get_env(self, node: _Element, eval_context: dict | None = ...) -> Environment: ...
|
||||
def make_xml_id(self, xml_id: str) -> str: ...
|
||||
def _test_xml_id(self, xml_id: str) -> None: ...
|
||||
def _tag_delete(self, rec: _Element) -> None: ...
|
||||
def _tag_report(self, rec: _Element): ...
|
||||
def _tag_function(self, rec: _Element) -> None: ...
|
||||
def _tag_act_window(self, rec: _Element) -> None: ...
|
||||
def _tag_menuitem(self, rec: _Element, parent: Any | None = ...) -> None: ...
|
||||
def _tag_record(self, rec: _Element) -> tuple[str, int] | None: ...
|
||||
def _tag_template(self, el: _Element) -> tuple[str, int] | None: ...
|
||||
def id_get(self, id_str: str, raise_if_not_found: bool = ...) -> int | None: ...
|
||||
def model_id_get(self, id_str: str, raise_if_not_found: bool = ...) -> tuple[Any, Any]: ...
|
||||
def _tag_root(self, el: _Element) -> None: ...
|
||||
@property
|
||||
def env(self): ...
|
||||
def env(self) -> Environment: ...
|
||||
@property
|
||||
def noupdate(self): ...
|
||||
mode: Any
|
||||
module: Any
|
||||
envs: Any
|
||||
idref: Any
|
||||
_noupdate: Any
|
||||
xml_filename: Any
|
||||
_tags: Any
|
||||
def __init__(self, cr, module, idref, mode, noupdate: bool = ..., xml_filename: Any | None = ...) -> None: ...
|
||||
def parse(self, de) -> None: ...
|
||||
DATA_ROOTS: Any
|
||||
def noupdate(self) -> bool: ...
|
||||
mode: str
|
||||
module: str
|
||||
envs: list[Environment]
|
||||
idref: dict
|
||||
_noupdate: list[bool]
|
||||
xml_filename: str
|
||||
_tags: dict[str, Callable]
|
||||
def __init__(self, cr: Cursor, module: str, idref: dict, mode: str, noupdate: bool = ..., xml_filename: str | None = ...) -> None: ...
|
||||
def parse(self, de: _Element) -> None: ...
|
||||
DATA_ROOTS: list[str]
|
||||
|
||||
def convert_file(cr, module, filename, idref, mode: str = ..., noupdate: bool = ..., kind: Any | None = ..., pathname: Any | None = ...) -> None: ...
|
||||
def convert_sql_import(cr, fp) -> None: ...
|
||||
def convert_csv_import(cr, module, fname, csvcontent, idref: Any | None = ..., mode: str = ..., noupdate: bool = ...) -> None: ...
|
||||
def convert_xml_import(cr, module, xmlfile, idref: Any | None = ..., mode: str = ..., noupdate: bool = ..., report: Any | None = ...) -> None: ...
|
||||
def convert_file(cr: Cursor, module: str, filename: str, idref: dict, mode: str = ..., noupdate: bool = ..., kind: str | None = ..., pathname: str | None = ...) -> None: ...
|
||||
def convert_sql_import(cr: Cursor, fp: TextIO) -> None: ...
|
||||
def convert_csv_import(cr: Cursor, module: str, fname: str, csvcontent: bytes, idref: dict | None = ..., mode: str = ..., noupdate: bool = ...) -> None: ...
|
||||
def convert_xml_import(cr: Cursor, module: str, xmlfile: str | BufferedReader, idref: dict | None = ..., mode: str = ..., noupdate: bool = ..., report: Any | None = ...) -> None: ...
|
||||
|
||||
@@ -3,17 +3,16 @@ from dateutil.relativedelta import relativedelta
|
||||
|
||||
from typing import Tuple, Iterator, TypeVar
|
||||
|
||||
_T = TypeVar('_T', datetime.date, datetime.datetime)
|
||||
_DateTimeT = TypeVar('_DateTimeT', datetime.date, datetime.datetime)
|
||||
|
||||
|
||||
def get_month(date: _T) -> Tuple[_T, _T]: ...
|
||||
def get_month(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||
def get_quarter_number(date) -> int: ...
|
||||
def get_quarter(date: _T) -> Tuple[_T, _T]: ...
|
||||
def get_fiscal_year(date: _T, day: int = ..., month: int = ...) -> Tuple[_T, _T]: ...
|
||||
def get_quarter(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||
def get_fiscal_year(date: _DateTimeT, day: int = ..., month: int = ...) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||
def get_timedelta(qty, granularity) -> relativedelta: ...
|
||||
def start_of(value: _T, granularity) -> _T: ...
|
||||
def end_of(value: _T, granularity) -> _T: ...
|
||||
def add(value: _T, *args, **kwargs) -> _T: ...
|
||||
def subtract(value: _T, *args, **kwargs) -> _T: ...
|
||||
def start_of(value: _DateTimeT, granularity) -> _DateTimeT: ...
|
||||
def end_of(value: _DateTimeT, granularity) -> _DateTimeT: ...
|
||||
def add(value: _DateTimeT, *args, **kwargs) -> _DateTimeT: ...
|
||||
def subtract(value: _DateTimeT, *args, **kwargs) -> _DateTimeT: ...
|
||||
def json_default(obj) -> str: ...
|
||||
def date_range(start: datetime.datetime, end: datetime.datetime, step: relativedelta = ...) -> Iterator[datetime.datetime]: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any
|
||||
from ..tools.config import configmanager
|
||||
|
||||
_logger: Any
|
||||
SUPPORTED_DEBUGGER: Any
|
||||
SUPPORTED_DEBUGGER: set[str]
|
||||
|
||||
def post_mortem(config, info) -> None: ...
|
||||
def post_mortem(config: configmanager, info) -> None: ...
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
def round(f): ...
|
||||
def _float_check_precision(precision_digits: Any | None = ..., precision_rounding: Any | None = ...): ...
|
||||
def float_round(value, precision_digits: Any | None = ..., precision_rounding: Any | None = ..., rounding_method: str = ...): ...
|
||||
def float_is_zero(value, precision_digits: Any | None = ..., precision_rounding: Any | None = ...): ...
|
||||
def float_compare(value1, value2, precision_digits: Any | None = ..., precision_rounding: Any | None = ...): ...
|
||||
def float_repr(value, precision_digits): ...
|
||||
def round(f: float) -> float: ...
|
||||
def _float_check_precision(precision_digits: int | None = ..., precision_rounding: float | None = ...) -> float: ...
|
||||
def float_round(value: float, precision_digits: int | None = ..., precision_rounding: float | None = ..., rounding_method: str = ...) -> float: ...
|
||||
def float_is_zero(value: float, precision_digits: int | None = ..., precision_rounding: float | None = ...) -> bool: ...
|
||||
def float_compare(value1: float, value2: float, precision_digits: int | None = ..., precision_rounding: float | None = ...) -> int: ...
|
||||
def float_repr(value: float, precision_digits: int) -> str: ...
|
||||
_float_repr = float_repr
|
||||
|
||||
def float_split_str(value, precision_digits): ...
|
||||
def float_split(value, precision_digits): ...
|
||||
def float_split_str(value: float, precision_digits: int) -> tuple[str, str]: ...
|
||||
def float_split(value: float, precision_digits: int) -> tuple[int, int]: ...
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from json import JSONEncoder as JSONEncoder
|
||||
from typing import Any
|
||||
|
||||
__all__: Any
|
||||
from typing import Any, Callable
|
||||
|
||||
class lazy_property:
|
||||
fget: Any
|
||||
@@ -18,7 +16,7 @@ class lazy_classproperty(lazy_property):
|
||||
def conditional(condition, decorator): ...
|
||||
def synchronized(lock_attr: str = ...): ...
|
||||
def frame_codeinfo(fframe, back: int = ...): ...
|
||||
def compose(a, b): ...
|
||||
def compose(a: Callable, b: Callable): ...
|
||||
|
||||
class _ClassProperty(property):
|
||||
def __get__(self, cls, owner): ...
|
||||
@@ -26,7 +24,7 @@ class _ClassProperty(property):
|
||||
def classproperty(func): ...
|
||||
|
||||
class lazy:
|
||||
__slots__: Any
|
||||
__slots__ = ['_func', '_args', '_kwargs', '_cached_value']
|
||||
def __init__(self, func, *args, **kwargs) -> None: ...
|
||||
@property
|
||||
def _value(self): ...
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
__path__: Any
|
||||
|
||||
Reference in New Issue
Block a user