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:
@@ -10,5 +10,13 @@ from .xml_utils import *
|
|||||||
from .date_utils import *
|
from .date_utils import *
|
||||||
from .convert import *
|
from .convert import *
|
||||||
from .template_inheritance import *
|
from .template_inheritance import *
|
||||||
from . import 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 .config import config as config
|
||||||
|
|||||||
0
odoo-stubs/tools/_monkeypatches.pyi
Normal file
0
odoo-stubs/tools/_monkeypatches.pyi
Normal file
0
odoo-stubs/tools/_vendor/__init__.pyi
Normal file
0
odoo-stubs/tools/_vendor/__init__.pyi
Normal file
53
odoo-stubs/tools/_vendor/sessions.pyi
Normal file
53
odoo-stubs/tools/_vendor/sessions.pyi
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
from re import Pattern
|
||||||
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
|
from werkzeug.datastructures import CallbackDict
|
||||||
|
|
||||||
|
_ModificationTrackingDictT = TypeVar('_ModificationTrackingDictT', bound=ModificationTrackingDict)
|
||||||
|
_SessionT = TypeVar('_SessionT', bound=Session)
|
||||||
|
|
||||||
|
_sha1_re: Pattern
|
||||||
|
|
||||||
|
def generate_key(salt: Any = ...) -> str: ...
|
||||||
|
|
||||||
|
class ModificationTrackingDict(CallbackDict):
|
||||||
|
__slots__ = ('modified',)
|
||||||
|
modified: bool
|
||||||
|
def __init__(self, *args, **kwargs): ...
|
||||||
|
def copy(self: _ModificationTrackingDictT) -> _ModificationTrackingDictT: ...
|
||||||
|
def __copy__(self: _ModificationTrackingDictT) -> _ModificationTrackingDictT: ...
|
||||||
|
|
||||||
|
class Session(ModificationTrackingDict):
|
||||||
|
__slots__ = ('modified', 'sid', 'new')
|
||||||
|
sid: str
|
||||||
|
new: bool
|
||||||
|
def __init__(self, data, sid, new: bool = ...): ...
|
||||||
|
def __repr__(self) -> str: ...
|
||||||
|
@property
|
||||||
|
def should_save(self) -> bool: ...
|
||||||
|
|
||||||
|
class SessionStore(Generic[_SessionT]):
|
||||||
|
session_class: type[_SessionT]
|
||||||
|
def __init__(self, session_class: type[_SessionT] | None = ...): ...
|
||||||
|
def is_valid_key(self, key) -> bool: ...
|
||||||
|
def generate_key(self, salt: Any = ...) -> str: ...
|
||||||
|
def new(self) -> _SessionT: ...
|
||||||
|
def save(self, session: _SessionT) -> None: ...
|
||||||
|
def save_if_modified(self, session: _SessionT) -> None: ...
|
||||||
|
def delete(self, session: _SessionT) -> None: ...
|
||||||
|
def get(self, sid: str) -> _SessionT: ...
|
||||||
|
|
||||||
|
_fs_transaction_suffix: str
|
||||||
|
|
||||||
|
class FilesystemSessionStore(SessionStore[_SessionT]):
|
||||||
|
path: str | None
|
||||||
|
filename_template: str
|
||||||
|
renew_missing: bool
|
||||||
|
mode: int
|
||||||
|
def __init__(self, path: str | None = ..., filename_template: str = ..., session_class: type[_SessionT] | None = ...,
|
||||||
|
renew_missing: bool = ..., mode: int = ...) -> None: ...
|
||||||
|
def get_session_filename(self, sid: str) -> str: ...
|
||||||
|
def save(self, session: _SessionT) -> None: ...
|
||||||
|
def delete(self, session: _SessionT) -> None: ...
|
||||||
|
def get(self, sid: str) -> _SessionT: ...
|
||||||
|
def list(self) -> list[str]: ...
|
||||||
@@ -1,38 +1,36 @@
|
|||||||
from typing import Any, Optional
|
from typing import Callable
|
||||||
|
|
||||||
__version_info__: Any
|
__version_info__: tuple
|
||||||
__version__: Any
|
__version__: str
|
||||||
|
|
||||||
def user_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
def user_data_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...) -> str: ...
|
||||||
def site_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
def site_data_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...) -> str: ...
|
||||||
def user_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
def user_config_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...) -> str: ...
|
||||||
def site_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
def site_config_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...) -> str: ...
|
||||||
def user_cache_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: bool = ...): ...
|
def user_cache_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...) -> str: ...
|
||||||
def user_log_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: bool = ...): ...
|
def user_log_dir(appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...) -> str: ...
|
||||||
|
|
||||||
class AppDirs:
|
class AppDirs:
|
||||||
appname: Any = ...
|
appname: str
|
||||||
appauthor: Any = ...
|
appauthor: str | None
|
||||||
version: Any = ...
|
version: str | None
|
||||||
roaming: Any = ...
|
roaming: bool
|
||||||
multipath: Any = ...
|
multipath: bool
|
||||||
def __init__(self, appname: Any, appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
def __init__(self, appname: str, appauthor: str | None = ..., version: str | None = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
||||||
@property
|
@property
|
||||||
def user_data_dir(self): ...
|
def user_data_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def site_data_dir(self): ...
|
def site_data_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def user_config_dir(self): ...
|
def user_config_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def site_config_dir(self): ...
|
def site_config_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def user_cache_dir(self): ...
|
def user_cache_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def user_log_dir(self): ...
|
def user_log_dir(self) -> str: ...
|
||||||
|
|
||||||
def _get_win_folder_from_registry(csidl_name: Any): ...
|
def _get_win_folder_from_registry(csidl_name: str) -> str: ...
|
||||||
def _get_win_folder_with_pywin32(csidl_name: Any): ...
|
def _get_win_folder_with_pywin32(csidl_name: str) -> str: ...
|
||||||
def _get_win_folder_with_ctypes(csidl_name: Any): ...
|
def _get_win_folder_with_ctypes(csidl_name: str) -> str: ...
|
||||||
_get_win_folder = _get_win_folder_with_pywin32
|
_get_win_folder: Callable[[str], str]
|
||||||
_get_win_folder = _get_win_folder_with_ctypes
|
|
||||||
_get_win_folder = _get_win_folder_from_registry
|
|
||||||
|
|||||||
@@ -1,50 +1,55 @@
|
|||||||
from typing import Any, Optional
|
from collections import defaultdict
|
||||||
|
from typing import Any, Callable, TypeVar
|
||||||
|
|
||||||
|
from .lru import LRU
|
||||||
|
from ..models import BaseModel
|
||||||
|
|
||||||
|
_T = TypeVar('_T')
|
||||||
|
_CallableT = TypeVar('_CallableT')
|
||||||
|
|
||||||
unsafe_eval = eval
|
unsafe_eval = eval
|
||||||
_logger: Any
|
|
||||||
|
|
||||||
class ormcache_counter:
|
class ormcache_counter:
|
||||||
__slots__: Any = ...
|
hit: int
|
||||||
hit: int = ...
|
miss: int
|
||||||
miss: int = ...
|
err: int
|
||||||
err: int = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
@property
|
@property
|
||||||
def ratio(self): ...
|
def ratio(self) -> float: ...
|
||||||
|
|
||||||
STAT: Any
|
STAT: defaultdict[Any, ormcache_counter]
|
||||||
|
|
||||||
class ormcache:
|
class ormcache:
|
||||||
args: Any = ...
|
args: Any
|
||||||
skiparg: Any = ...
|
skiparg: Any
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args, **kwargs) -> None: ...
|
||||||
method: Any = ...
|
method: Callable
|
||||||
def __call__(self, method: Any): ...
|
def __call__(self, method: _CallableT) -> _CallableT: ...
|
||||||
key: Any = ...
|
key: Any
|
||||||
def determine_key(self): ...
|
def determine_key(self): ...
|
||||||
def lru(self, model: Any): ...
|
def lru(self, model: BaseModel) -> tuple[LRU, tuple[str, Callable], ormcache_counter]: ...
|
||||||
def lookup(self, method: Any, *args: Any, **kwargs: Any): ...
|
def lookup(self, method: Callable, *args, **kwargs): ...
|
||||||
def clear(self, model: Any, *args: Any) -> None: ...
|
def clear(self, model: BaseModel, *args) -> None: ...
|
||||||
|
|
||||||
class ormcache_context(ormcache):
|
class ormcache_context(ormcache):
|
||||||
keys: Any = ...
|
keys: Any
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args, **kwargs) -> None: ...
|
||||||
key: Any = ...
|
key: Any
|
||||||
def determine_key(self) -> None: ...
|
def determine_key(self) -> None: ...
|
||||||
|
|
||||||
class ormcache_multi(ormcache):
|
class ormcache_multi(ormcache):
|
||||||
multi: Any = ...
|
multi: Any
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args, **kwargs) -> None: ...
|
||||||
key_multi: Any = ...
|
key_multi: Any
|
||||||
multi_pos: Any = ...
|
multi_pos: Any
|
||||||
def determine_key(self) -> None: ...
|
def determine_key(self) -> None: ...
|
||||||
def lookup(self, method: Any, *args: Any, **kwargs: Any): ...
|
def lookup(self, method: Callable, *args, **kwargs): ...
|
||||||
|
|
||||||
class dummy_cache:
|
class dummy_cache:
|
||||||
def __init__(self, *l: Any, **kw: Any) -> None: ...
|
def __init__(self, *l, **kw) -> None: ...
|
||||||
def __call__(self, fn: Any): ...
|
def __call__(self, fn): ...
|
||||||
def clear(self, *l: Any, **kw: Any) -> None: ...
|
def clear(self, *l, **kw) -> None: ...
|
||||||
|
|
||||||
def log_ormcache_stats(sig: Optional[Any] = ..., frame: Optional[Any] = ...): ...
|
def log_ormcache_stats(sig: Any | None = ..., frame: Any | None = ...): ...
|
||||||
def get_cache_key_counter(bound_method: Any, *args: Any, **kwargs: Any): ...
|
def get_cache_key_counter(bound_method, *args, **kwargs): ...
|
||||||
cache = ormcache
|
cache = ormcache
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
|
from ..api import Environment
|
||||||
|
|
||||||
VERSION: int
|
VERSION: int
|
||||||
DEFAULT_EXCLUDE: Any
|
DEFAULT_EXCLUDE: list[str]
|
||||||
STANDARD_MODULES: Any
|
STANDARD_MODULES: list[str]
|
||||||
MAX_FILE_SIZE: Any
|
MAX_FILE_SIZE: int
|
||||||
|
|
||||||
class Cloc:
|
class Cloc:
|
||||||
modules: Any = ...
|
modules: dict
|
||||||
code: Any = ...
|
code: dict
|
||||||
total: Any = ...
|
total: dict
|
||||||
errors: Any = ...
|
errors: dict
|
||||||
max_width: int = ...
|
excluded: dict
|
||||||
|
max_width: int
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
def parse_xml(self, s: Any): ...
|
def parse_xml(self, s: str) -> tuple[int, int]: ...
|
||||||
def parse_py(self, s: Any): ...
|
def parse_py(self, s: str) -> tuple[int, int]: ...
|
||||||
def parse_js(self, s: Any): ...
|
def parse_js(self, s: str) -> tuple[int, int]: ...
|
||||||
def book(self, module: Any, item: str = ..., count: Any = ...) -> None: ...
|
def book(self, module: str, item: str = ..., count: tuple[Any, Any] = ..., exclude: bool = ...) -> None: ...
|
||||||
def count_path(self, path: Any, exclude: Optional[Any] = ...) -> None: ...
|
def count_path(self, path: str, exclude: set[str] | None = ...) -> None: ...
|
||||||
def count_modules(self, env: Any) -> None: ...
|
def count_modules(self, env: Environment) -> None: ...
|
||||||
def count_customization(self, env: Any) -> None: ...
|
def count_customization(self, env: Environment) -> None: ...
|
||||||
def count_env(self, env: Any) -> None: ...
|
def count_env(self, env: Environment) -> None: ...
|
||||||
def count_database(self, database: Any) -> None: ...
|
def count_database(self, database) -> None: ...
|
||||||
def report(self, verbose: bool = ..., width: Optional[Any] = ...): ...
|
def report(self, verbose: bool = ..., width: float | None = ...): ...
|
||||||
|
|||||||
@@ -1,49 +1,51 @@
|
|||||||
import optparse
|
from optparse import Option, OptionParser
|
||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
crypt_context: Any
|
from passlib.context import CryptContext
|
||||||
|
|
||||||
class MyOption(optparse.Option):
|
crypt_context: CryptContext
|
||||||
my_default: Any = ...
|
|
||||||
def __init__(self, *opts: Any, **attrs: Any) -> None: ...
|
class MyOption(Option):
|
||||||
|
my_default: Any
|
||||||
|
def __init__(self, *opts, **attrs) -> None: ...
|
||||||
|
|
||||||
DEFAULT_LOG_HANDLER: str
|
DEFAULT_LOG_HANDLER: str
|
||||||
|
|
||||||
def _get_default_datadir(): ...
|
def _get_default_datadir() -> str: ...
|
||||||
def _deduplicate_loggers(loggers: Any): ...
|
def _deduplicate_loggers(loggers) -> tuple[str, ...]: ...
|
||||||
|
|
||||||
class configmanager:
|
class configmanager:
|
||||||
options: Any = ...
|
options: dict[str, Any]
|
||||||
blacklist_for_save: Any = ...
|
blacklist_for_save: set[str]
|
||||||
casts: Any = ...
|
casts: dict
|
||||||
misc: Any = ...
|
misc: dict
|
||||||
config_file: Any = ...
|
config_file: str
|
||||||
_LOGLEVELS: Any = ...
|
_LOGLEVELS: dict
|
||||||
parser: Any = ...
|
parser: OptionParser
|
||||||
def __init__(self, fname: Optional[Any] = ...) -> None: ...
|
def __init__(self, fname: str | None = ...) -> None: ...
|
||||||
def parse_config(self, args: Optional[Any] = ...): ...
|
def parse_config(self, args: list | None = ...): ...
|
||||||
rcfile: Any = ...
|
rcfile: str
|
||||||
def _parse_config(self, args: Optional[Any] = ...): ...
|
def _parse_config(self, args: list | None = ...): ...
|
||||||
def _warn_deprecated_options(self) -> None: ...
|
def _warn_deprecated_options(self) -> None: ...
|
||||||
def _is_addons_path(self, path: Any): ...
|
def _is_addons_path(self, path: str) -> bool: ...
|
||||||
def _check_addons_path(self, option: Any, opt: Any, value: Any, parser: Any) -> None: ...
|
def _check_addons_path(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||||
def _check_upgrade_path(self, option: Any, opt: Any, value: Any, parser: Any) -> None: ...
|
def _check_upgrade_path(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||||
def _is_upgrades_path(self, res: Any): ...
|
def _is_upgrades_path(self, res: str) -> bool: ...
|
||||||
def _test_enable_callback(self, option: Any, opt: Any, value: Any, parser: Any) -> None: ...
|
def _test_enable_callback(self, option: MyOption, opt, value, parser: OptionParser) -> None: ...
|
||||||
def load(self) -> None: ...
|
def load(self) -> None: ...
|
||||||
def save(self) -> None: ...
|
def save(self) -> None: ...
|
||||||
def get(self, key: Any, default: Optional[Any] = ...): ...
|
def get(self, key, default: Any | None = ...): ...
|
||||||
def pop(self, key: Any, default: Optional[Any] = ...): ...
|
def pop(self, key, default: Any | None = ...): ...
|
||||||
def get_misc(self, sect: Any, key: Any, default: Optional[Any] = ...): ...
|
def get_misc(self, sect, key, default: Any | None = ...): ...
|
||||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
def __setitem__(self, key, value) -> None: ...
|
||||||
def __getitem__(self, key: Any): ...
|
def __getitem__(self, key): ...
|
||||||
@property
|
@property
|
||||||
def addons_data_dir(self): ...
|
def addons_data_dir(self) -> str: ...
|
||||||
@property
|
@property
|
||||||
def session_dir(self): ...
|
def session_dir(self) -> str: ...
|
||||||
def filestore(self, dbname: Any): ...
|
def filestore(self, dbname: str) -> str: ...
|
||||||
def set_admin_password(self, new_password: Any) -> None: ...
|
def set_admin_password(self, new_password) -> None: ...
|
||||||
def verify_admin_password(self, password: Any): ...
|
def verify_admin_password(self, password) -> bool: ...
|
||||||
def _normalize(self, path: Any): ...
|
def _normalize(self, path: str) -> str: ...
|
||||||
|
|
||||||
config: Any
|
config: configmanager
|
||||||
|
|||||||
@@ -1,54 +1,62 @@
|
|||||||
from .misc import ustr as ustr
|
from io import BufferedReader
|
||||||
from odoo import api as api
|
from typing import Any, Callable, TextIO
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
__all__: Any
|
from lxml.etree import _Element
|
||||||
_logger: Any
|
|
||||||
safe_eval: Any
|
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): ...
|
class ParseError(Exception): ...
|
||||||
|
|
||||||
class RecordDictWrapper(dict):
|
class RecordDictWrapper(dict):
|
||||||
record: Any = ...
|
record: Any
|
||||||
def __init__(self, record: Any) -> None: ...
|
def __init__(self, record) -> None: ...
|
||||||
def __getitem__(self, key: Any): ...
|
def __getitem__(self, key): ...
|
||||||
|
|
||||||
def _get_idref(self, env: Any, model_str: Any, idref: Any): ...
|
def _get_idref(self, env: Environment, model_str: str, idref: dict) -> dict: ...
|
||||||
def _fix_multiple_roots(node: Any) -> None: ...
|
def _fix_multiple_roots(node: _Element) -> None: ...
|
||||||
def _eval_xml(self, node: Any, env: Any): ...
|
def _eval_xml(self, node: _Element, env: Environment): ...
|
||||||
def str2bool(value: Any): ...
|
def str2bool(value) -> bool: ...
|
||||||
def nodeattr2bool(node: Any, attr: Any, default: bool = ...): ...
|
def nodeattr2bool(node: _Element, attr, default: bool = ...) -> bool: ...
|
||||||
|
|
||||||
class xml_import:
|
class xml_import:
|
||||||
def get_env(self, node: Any, eval_context: Optional[Any] = ...): ...
|
def get_env(self, node: _Element, eval_context: dict | None = ...) -> Environment: ...
|
||||||
def make_xml_id(self, xml_id: Any): ...
|
def make_xml_id(self, xml_id: str) -> str: ...
|
||||||
def _test_xml_id(self, xml_id: Any) -> None: ...
|
def _test_xml_id(self, xml_id: str) -> None: ...
|
||||||
def _tag_delete(self, rec: Any) -> None: ...
|
def _tag_delete(self, rec: _Element) -> None: ...
|
||||||
def _tag_report(self, rec: Any): ...
|
def _tag_report(self, rec: _Element): ...
|
||||||
def _tag_function(self, rec: Any) -> None: ...
|
def _tag_function(self, rec: _Element) -> None: ...
|
||||||
def _tag_act_window(self, rec: Any) -> None: ...
|
def _tag_act_window(self, rec: _Element) -> None: ...
|
||||||
def _tag_menuitem(self, rec: Any, parent: Optional[Any] = ...) -> None: ...
|
def _tag_menuitem(self, rec: _Element, parent: Any | None = ...) -> None: ...
|
||||||
def _tag_record(self, rec: Any): ...
|
def _tag_record(self, rec: _Element) -> tuple[str, int] | None: ...
|
||||||
def _tag_template(self, el: Any): ...
|
def _tag_template(self, el: _Element) -> tuple[str, int] | None: ...
|
||||||
def id_get(self, id_str: Any, raise_if_not_found: bool = ...): ...
|
def id_get(self, id_str: str, raise_if_not_found: bool = ...) -> int | None: ...
|
||||||
def model_id_get(self, id_str: Any, raise_if_not_found: bool = ...): ...
|
def model_id_get(self, id_str: str, raise_if_not_found: bool = ...) -> tuple[Any, Any]: ...
|
||||||
def _tag_root(self, el: Any) -> None: ...
|
def _tag_root(self, el: _Element) -> None: ...
|
||||||
@property
|
@property
|
||||||
def env(self): ...
|
def env(self) -> Environment: ...
|
||||||
@property
|
@property
|
||||||
def noupdate(self): ...
|
def noupdate(self) -> bool: ...
|
||||||
mode: Any = ...
|
mode: str
|
||||||
module: Any = ...
|
module: str
|
||||||
envs: Any = ...
|
envs: list[Environment]
|
||||||
idref: Any = ...
|
idref: dict
|
||||||
_noupdate: Any = ...
|
_noupdate: list[bool]
|
||||||
xml_filename: Any = ...
|
xml_filename: str
|
||||||
_tags: Any = ...
|
_tags: dict[str, Callable]
|
||||||
def __init__(self, cr: Any, module: Any, idref: Any, mode: Any, noupdate: bool = ..., xml_filename: Optional[Any] = ...) -> None: ...
|
def __init__(self, cr: Cursor, module: str, idref: dict, mode: str, noupdate: bool = ..., xml_filename: str | None = ...) -> None: ...
|
||||||
def parse(self, de: Any) -> None: ...
|
def parse(self, de: _Element) -> None: ...
|
||||||
DATA_ROOTS: Any = ...
|
DATA_ROOTS: list[str]
|
||||||
|
|
||||||
def convert_file(cr: Any, module: Any, filename: Any, idref: Any, mode: str = ..., noupdate: bool = ..., kind: Optional[Any] = ..., pathname: Optional[Any] = ...) -> 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: Any, fp: Any) -> None: ...
|
def convert_sql_import(cr: Cursor, fp: TextIO) -> None: ...
|
||||||
def convert_csv_import(cr: Any, module: Any, fname: Any, csvcontent: Any, idref: Optional[Any] = ..., mode: str = ..., noupdate: bool = ...) -> 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: Any, module: Any, xmlfile: Any, idref: Optional[Any] = ..., mode: str = ..., noupdate: bool = ..., report: Optional[Any] = ...) -> None: ...
|
def convert_xml_import(cr: Cursor, module: str, xmlfile: str | BufferedReader, idref: dict | None = ..., mode: str = ..., noupdate: bool = ..., report: Any | None = ...) -> None: ...
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
from typing import Tuple, Iterator, TypeVar
|
||||||
|
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
|
|
||||||
from typing import Any, Tuple, Iterator, TypeVar
|
_DateTimeT = TypeVar('_DateTimeT', datetime.date, datetime.datetime)
|
||||||
|
|
||||||
_T = TypeVar('_T', datetime.date, datetime.datetime)
|
def get_month(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||||
|
def get_quarter_number(date) -> int: ...
|
||||||
|
def get_quarter(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||||
def get_month(date: _T) -> Tuple[_T, _T]: ...
|
def get_fiscal_year(date: _DateTimeT, day: int = ..., month: int = ...) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||||
def get_quarter_number(date: Any) -> int: ...
|
def get_timedelta(qty, granularity) -> relativedelta: ...
|
||||||
def get_quarter(date: _T) -> Tuple[_T, _T]: ...
|
def start_of(value: _DateTimeT, granularity) -> _DateTimeT: ...
|
||||||
def get_fiscal_year(date: _T, day: int = ..., month: int = ...) -> Tuple[_T, _T]: ...
|
def end_of(value: _DateTimeT, granularity) -> _DateTimeT: ...
|
||||||
def get_timedelta(qty: Any, granularity: Any) -> relativedelta: ...
|
def add(value: _DateTimeT, *args, **kwargs) -> _DateTimeT: ...
|
||||||
def start_of(value: _T, granularity: Any) -> _T: ...
|
def subtract(value: _DateTimeT, *args, **kwargs) -> _DateTimeT: ...
|
||||||
def end_of(value: _T, granularity: Any) -> _T: ...
|
def json_default(obj) -> str: ...
|
||||||
def add(value: _T, *args: Any, **kwargs: Any) -> _T: ...
|
|
||||||
def subtract(value: _T, *args: Any, **kwargs: Any) -> _T: ...
|
|
||||||
def json_default(obj: Any) -> str: ...
|
|
||||||
def date_range(start: datetime.datetime, end: datetime.datetime, step: relativedelta = ...) -> Iterator[datetime.datetime]: ...
|
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: set[str]
|
||||||
SUPPORTED_DEBUGGER: Any
|
|
||||||
|
|
||||||
def post_mortem(config: Any, info: Any) -> None: ...
|
def post_mortem(config: configmanager, info) -> None: ...
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
from typing import Any, Optional
|
def round(f: float) -> float: ...
|
||||||
|
def _float_check_precision(precision_digits: int | None = ..., precision_rounding: float | None = ...) -> float: ...
|
||||||
def round(f: Any): ...
|
def float_round(value: float, precision_digits: int | None = ..., precision_rounding: float | None = ..., rounding_method: str = ...) -> float: ...
|
||||||
def _float_check_precision(precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
def float_is_zero(value: float, precision_digits: int | None = ..., precision_rounding: float | None = ...) -> bool: ...
|
||||||
def float_round(value: Any, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ..., rounding_method: str = ...): ...
|
def float_compare(value1: float, value2: float, precision_digits: int | None = ..., precision_rounding: float | None = ...) -> int: ...
|
||||||
def float_is_zero(value: Any, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
def float_repr(value: float, precision_digits: int) -> str: ...
|
||||||
def float_compare(value1: Any, value2: Any, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
|
||||||
def float_repr(value: Any, precision_digits: Any): ...
|
|
||||||
_float_repr = float_repr
|
_float_repr = float_repr
|
||||||
|
def float_split_str(value: float, precision_digits: int) -> tuple[str, str]: ...
|
||||||
def float_split_str(value: Any, precision_digits: Any): ...
|
def float_split(value: float, precision_digits: int) -> tuple[int, int]: ...
|
||||||
def float_split(value: Any, precision_digits: Any): ...
|
|
||||||
|
|||||||
@@ -1,100 +1,100 @@
|
|||||||
from json import JSONEncoder as JSONEncoder
|
from json import JSONEncoder as JSONEncoder
|
||||||
from typing import Any
|
from typing import Callable, Generic, TypeVar
|
||||||
|
|
||||||
__all__: Any
|
_T = TypeVar('_T')
|
||||||
|
|
||||||
class lazy_property:
|
class lazy_property(Generic[_T]):
|
||||||
fget: Any = ...
|
fget: Callable[..., _T]
|
||||||
def __init__(self, fget: Any) -> None: ...
|
def __init__(self, fget: Callable[..., _T]) -> None: ...
|
||||||
def __get__(self, obj: Any, cls: Any): ...
|
def __get__(self, obj, cls) -> _T: ...
|
||||||
@property
|
@property
|
||||||
def __doc__(self): ...
|
def __doc__(self): ...
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reset_all(obj: Any) -> None: ...
|
def reset_all(obj) -> None: ...
|
||||||
|
|
||||||
class lazy_classproperty(lazy_property):
|
class lazy_classproperty(lazy_property[_T]):
|
||||||
def __get__(self, obj: Any, cls: Any): ...
|
def __get__(self, obj, cls) -> _T: ...
|
||||||
|
|
||||||
def conditional(condition: Any, decorator: Any): ...
|
def conditional(condition, decorator): ...
|
||||||
def synchronized(lock_attr: str = ...): ...
|
def synchronized(lock_attr: str = ...) -> Callable[[_T], _T]: ...
|
||||||
def frame_codeinfo(fframe: Any, back: int = ...): ...
|
def frame_codeinfo(fframe, back: int = ...) -> tuple[str | None, str | None]: ...
|
||||||
def compose(a: Any, b: Any): ...
|
def compose(a: Callable[..., _T], b: Callable) -> Callable[..., _T]: ...
|
||||||
|
|
||||||
class _ClassProperty(property):
|
class _ClassProperty(property, Generic[_T]):
|
||||||
def __get__(self, cls: Any, owner: Any): ...
|
def __get__(self, cls, owner) -> _T: ...
|
||||||
|
|
||||||
def classproperty(func: Any): ...
|
def classproperty(func: Callable[..., _T]) -> _ClassProperty[_T]: ...
|
||||||
|
|
||||||
class lazy:
|
class lazy:
|
||||||
__slots__: Any = ...
|
__slots__ = ['_func', '_args', '_kwargs', '_cached_value']
|
||||||
def __init__(self, func: Any, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, func, *args, **kwargs) -> None: ...
|
||||||
@property
|
@property
|
||||||
def _value(self): ...
|
def _value(self): ...
|
||||||
def __getattr__(self, name: Any): ...
|
def __getattr__(self, name): ...
|
||||||
def __setattr__(self, name: Any, value: Any): ...
|
def __setattr__(self, name, value): ...
|
||||||
def __delattr__(self, name: Any): ...
|
def __delattr__(self, name): ...
|
||||||
def __repr__(self): ...
|
def __repr__(self): ...
|
||||||
def __str__(self): ...
|
def __str__(self): ...
|
||||||
def __bytes__(self): ...
|
def __bytes__(self): ...
|
||||||
def __format__(self, format_spec: Any): ...
|
def __format__(self, format_spec): ...
|
||||||
def __lt__(self, other: Any) -> Any: ...
|
def __lt__(self, other): ...
|
||||||
def __le__(self, other: Any) -> Any: ...
|
def __le__(self, other): ...
|
||||||
def __eq__(self, other: Any) -> Any: ...
|
def __eq__(self, other): ...
|
||||||
def __ne__(self, other: Any) -> Any: ...
|
def __ne__(self, other): ...
|
||||||
def __gt__(self, other: Any) -> Any: ...
|
def __gt__(self, other): ...
|
||||||
def __ge__(self, other: Any) -> Any: ...
|
def __ge__(self, other): ...
|
||||||
def __hash__(self) -> Any: ...
|
def __hash__(self): ...
|
||||||
def __bool__(self): ...
|
def __bool__(self): ...
|
||||||
def __call__(self, *args: Any, **kwargs: Any): ...
|
def __call__(self, *args, **kwargs): ...
|
||||||
def __len__(self): ...
|
def __len__(self): ...
|
||||||
def __getitem__(self, key: Any): ...
|
def __getitem__(self, key): ...
|
||||||
def __missing__(self, key: Any): ...
|
def __missing__(self, key): ...
|
||||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
def __setitem__(self, key, value) -> None: ...
|
||||||
def __delitem__(self, key: Any) -> None: ...
|
def __delitem__(self, key) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self): ...
|
||||||
def __reversed__(self): ...
|
def __reversed__(self): ...
|
||||||
def __contains__(self, key: Any): ...
|
def __contains__(self, key): ...
|
||||||
def __add__(self, other: Any): ...
|
def __add__(self, other): ...
|
||||||
def __sub__(self, other: Any): ...
|
def __sub__(self, other): ...
|
||||||
def __mul__(self, other: Any): ...
|
def __mul__(self, other): ...
|
||||||
def __matmul__(self, other: Any): ...
|
def __matmul__(self, other): ...
|
||||||
def __truediv__(self, other: Any): ...
|
def __truediv__(self, other): ...
|
||||||
def __floordiv__(self, other: Any): ...
|
def __floordiv__(self, other): ...
|
||||||
def __mod__(self, other: Any): ...
|
def __mod__(self, other): ...
|
||||||
def __divmod__(self, other: Any): ...
|
def __divmod__(self, other): ...
|
||||||
def __pow__(self, other: Any): ...
|
def __pow__(self, other): ...
|
||||||
def __lshift__(self, other: Any): ...
|
def __lshift__(self, other): ...
|
||||||
def __rshift__(self, other: Any): ...
|
def __rshift__(self, other): ...
|
||||||
def __and__(self, other: Any): ...
|
def __and__(self, other): ...
|
||||||
def __xor__(self, other: Any): ...
|
def __xor__(self, other): ...
|
||||||
def __or__(self, other: Any): ...
|
def __or__(self, other): ...
|
||||||
def __radd__(self, other: Any): ...
|
def __radd__(self, other): ...
|
||||||
def __rsub__(self, other: Any): ...
|
def __rsub__(self, other): ...
|
||||||
def __rmul__(self, other: Any): ...
|
def __rmul__(self, other): ...
|
||||||
def __rmatmul__(self, other: Any): ...
|
def __rmatmul__(self, other): ...
|
||||||
def __rtruediv__(self, other: Any): ...
|
def __rtruediv__(self, other): ...
|
||||||
def __rfloordiv__(self, other: Any): ...
|
def __rfloordiv__(self, other): ...
|
||||||
def __rmod__(self, other: Any): ...
|
def __rmod__(self, other): ...
|
||||||
def __rdivmod__(self, other: Any): ...
|
def __rdivmod__(self, other): ...
|
||||||
def __rpow__(self, other: Any): ...
|
def __rpow__(self, other): ...
|
||||||
def __rlshift__(self, other: Any): ...
|
def __rlshift__(self, other): ...
|
||||||
def __rrshift__(self, other: Any): ...
|
def __rrshift__(self, other): ...
|
||||||
def __rand__(self, other: Any): ...
|
def __rand__(self, other): ...
|
||||||
def __rxor__(self, other: Any): ...
|
def __rxor__(self, other): ...
|
||||||
def __ror__(self, other: Any): ...
|
def __ror__(self, other): ...
|
||||||
def __iadd__(self, other: Any): ...
|
def __iadd__(self, other): ...
|
||||||
def __isub__(self, other: Any): ...
|
def __isub__(self, other): ...
|
||||||
def __imul__(self, other: Any): ...
|
def __imul__(self, other): ...
|
||||||
def __imatmul__(self, other: Any): ...
|
def __imatmul__(self, other): ...
|
||||||
def __itruediv__(self, other: Any): ...
|
def __itruediv__(self, other): ...
|
||||||
def __ifloordiv__(self, other: Any): ...
|
def __ifloordiv__(self, other): ...
|
||||||
def __imod__(self, other: Any): ...
|
def __imod__(self, other): ...
|
||||||
def __ipow__(self, other: Any): ...
|
def __ipow__(self, other): ...
|
||||||
def __ilshift__(self, other: Any): ...
|
def __ilshift__(self, other): ...
|
||||||
def __irshift__(self, other: Any): ...
|
def __irshift__(self, other): ...
|
||||||
def __iand__(self, other: Any): ...
|
def __iand__(self, other): ...
|
||||||
def __ixor__(self, other: Any): ...
|
def __ixor__(self, other): ...
|
||||||
def __ior__(self, other: Any): ...
|
def __ior__(self, other): ...
|
||||||
def __neg__(self): ...
|
def __neg__(self): ...
|
||||||
def __pos__(self): ...
|
def __pos__(self): ...
|
||||||
def __abs__(self): ...
|
def __abs__(self): ...
|
||||||
@@ -108,9 +108,9 @@ class lazy:
|
|||||||
def __floor__(self): ...
|
def __floor__(self): ...
|
||||||
def __ceil__(self): ...
|
def __ceil__(self): ...
|
||||||
def __enter__(self): ...
|
def __enter__(self): ...
|
||||||
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||||
def __await__(self): ...
|
def __await__(self): ...
|
||||||
def __aiter__(self): ...
|
def __aiter__(self): ...
|
||||||
def __anext__(self): ...
|
def __anext__(self): ...
|
||||||
def __aenter__(self): ...
|
def __aenter__(self): ...
|
||||||
def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
def __aexit__(self, exc_type, exc_value, traceback): ...
|
||||||
|
|||||||
@@ -1,31 +1,35 @@
|
|||||||
from PIL import IcoImagePlugin as IcoImagePlugin
|
from PIL import IcoImagePlugin as IcoImagePlugin, ImageOps as ImageOps
|
||||||
from typing import Any, Optional
|
from typing import Any, Iterable, Literal
|
||||||
|
|
||||||
FILETYPE_BASE64_MAGICWORD: Any
|
from PIL.Image import Image
|
||||||
|
|
||||||
|
FILETYPE_BASE64_MAGICWORD: dict[bytes, str]
|
||||||
EXIF_TAG_ORIENTATION: int
|
EXIF_TAG_ORIENTATION: int
|
||||||
EXIF_TAG_ORIENTATION_TO_TRANSPOSE_METHODS: Any
|
EXIF_TAG_ORIENTATION_TO_TRANSPOSE_METHODS: dict[int, list]
|
||||||
IMAGE_MAX_RESOLUTION: float
|
IMAGE_MAX_RESOLUTION: float
|
||||||
|
|
||||||
class ImageProcess:
|
class ImageProcess:
|
||||||
base64_source: Any = ...
|
base64_source: bytes
|
||||||
operationsCount: int = ...
|
operationsCount: int
|
||||||
image: bool = ...
|
image: Image | Literal[False]
|
||||||
original_format: Any = ...
|
original_format: str
|
||||||
def __init__(self, base64_source: Any, verify_resolution: bool = ...) -> None: ...
|
def __init__(self, base64_source: bytes, verify_resolution: bool = ...) -> None: ...
|
||||||
def image_base64(self, quality: int = ..., output_format: str = ...): ...
|
def image_quality(self, quality: int = ..., output_format: str = ...) -> bytes | Literal[False]: ...
|
||||||
def resize(self, max_width: int = ..., max_height: int = ...): ...
|
def image_base64(self, quality: int = ..., output_format: str = ...) -> bytes | Literal[False]: ...
|
||||||
def crop_resize(self, max_width: Any, max_height: Any, center_x: float = ..., center_y: float = ...): ...
|
def resize(self, max_width: int = ..., max_height: int = ...) -> ImageProcess: ...
|
||||||
def colorize(self): ...
|
def crop_resize(self, max_width: int, max_height: int, center_x: float = ..., center_y: float = ...) -> ImageProcess: ...
|
||||||
|
def colorize(self) -> ImageProcess: ...
|
||||||
|
|
||||||
def image_process(base64_source: Any, size: Any = ..., verify_resolution: bool = ..., quality: int = ..., crop: Optional[Any] = ..., colorize: bool = ..., output_format: str = ...): ...
|
def image_process(base64_source: bytes, size: tuple[int, int] = ..., verify_resolution: bool = ..., quality: int = ..., crop: str | None = ..., colorize: bool = ..., output_format: str = ...) -> bytes: ...
|
||||||
def average_dominant_color(colors: Any, mitigate: int = ..., max_margin: int = ...): ...
|
def average_dominant_color(colors: list[tuple[Any, Any]], mitigate: int = ..., max_margin: int = ...) -> tuple[Any, Any]: ...
|
||||||
def image_fix_orientation(image: Any): ...
|
def image_fix_orientation(image: Image) -> Image: ...
|
||||||
def base64_to_image(base64_source: Any): ...
|
def base64_to_image(base64_source: bytes) -> Image: ...
|
||||||
def image_to_base64(image: Any, format: Any, **params: Any): ...
|
def image_apply_opt(image: Image, format: str | None, **params) -> bytes: ...
|
||||||
def is_image_size_above(base64_source_1: Any, base64_source_2: Any): ...
|
def image_to_base64(image: Image, format: str | None, **params) -> bytes: ...
|
||||||
def image_guess_size_from_field_name(field_name: Any): ...
|
def is_image_size_above(base64_source_1: bytes, base64_source_2: bytes) -> bool: ...
|
||||||
def image_data_uri(base64_source: Any): ...
|
def image_guess_size_from_field_name(field_name: str) -> tuple[int, int]: ...
|
||||||
def get_saturation(rgb: Any): ...
|
def image_data_uri(base64_source: bytes) -> str: ...
|
||||||
def get_lightness(rgb: Any): ...
|
def get_saturation(rgb: Iterable[int]) -> float: ...
|
||||||
def hex_to_rgb(hx: Any): ...
|
def get_lightness(rgb: Iterable[int]) -> float: ...
|
||||||
def rgb_to_hex(rgb: Any): ...
|
def hex_to_rgb(hx: str) -> tuple[int, int, int]: ...
|
||||||
|
def rgb_to_hex(rgb: Iterable[int]) -> str: ...
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
from typing import Any
|
JSON_SCRIPTSAFE_MAPPER: dict[str, str]
|
||||||
|
|
||||||
JSON_SCRIPTSAFE_MAPPER: Any
|
|
||||||
|
|
||||||
class JSON:
|
class JSON:
|
||||||
def loads(self, *args: Any, **kwargs: Any): ...
|
def loads(self, *args, **kwargs): ...
|
||||||
def dumps(self, *args: Any, **kwargs: Any): ...
|
def dumps(self, *args, **kwargs) -> str: ...
|
||||||
|
|
||||||
scriptsafe: Any
|
scriptsafe: JSON
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
from typing import Any, Optional
|
from collections import OrderedDict
|
||||||
|
from threading import RLock
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
__all__: Any
|
__all__ = ['LRU']
|
||||||
|
|
||||||
class LRU:
|
class LRU:
|
||||||
_lock: Any = ...
|
_lock: RLock
|
||||||
count: Any = ...
|
count: int
|
||||||
d: Any = ...
|
d: OrderedDict
|
||||||
def __init__(self, count: Any, pairs: Any = ...) -> None: ...
|
def __init__(self, count: int, pairs: tuple[Any, Any] = ...) -> None: ...
|
||||||
def __contains__(self, obj: Any): ...
|
def __contains__(self, obj) -> bool: ...
|
||||||
def get(self, obj: Any, val: Optional[Any] = ...): ...
|
def get(self, obj, val: Any | None = ...): ...
|
||||||
def __getitem__(self, obj: Any): ...
|
def __getitem__(self, obj): ...
|
||||||
def __setitem__(self, obj: Any, val: Any) -> None: ...
|
def __setitem__(self, obj, val) -> None: ...
|
||||||
def __delitem__(self, obj: Any) -> None: ...
|
def __delitem__(self, obj) -> None: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def pop(self, key: Any): ...
|
def pop(self, key): ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
|
|||||||
@@ -1,47 +1,59 @@
|
|||||||
from lxml.html import clean
|
from email.message import Message
|
||||||
from typing import Any, Optional
|
from re import Pattern
|
||||||
|
from typing import Any, FrozenSet, Literal
|
||||||
|
|
||||||
_logger: Any
|
from lxml.etree import _Element
|
||||||
tags_to_kill: Any
|
from lxml.html import clean
|
||||||
tags_to_remove: Any
|
from markupsafe import Markup
|
||||||
allowed_tags: Any
|
|
||||||
safe_attrs: Any
|
tags_to_kill: list[str]
|
||||||
|
tags_to_remove: list[str]
|
||||||
|
allowed_tags: FrozenSet
|
||||||
|
safe_attrs: FrozenSet
|
||||||
|
|
||||||
class _Cleaner(clean.Cleaner):
|
class _Cleaner(clean.Cleaner):
|
||||||
_style_re: Any = ...
|
_style_re: Pattern
|
||||||
_style_whitelist: Any = ...
|
_style_whitelist: list[str]
|
||||||
strip_classes: bool = ...
|
strip_classes: bool
|
||||||
sanitize_style: bool = ...
|
sanitize_style: bool
|
||||||
def __call__(self, doc: Any) -> None: ...
|
def __call__(self, doc: _Element) -> None: ...
|
||||||
def tag_quote(self, el: Any): ...
|
def tag_quote(self, el: _Element) -> None: ...
|
||||||
def strip_class(self, el: Any) -> None: ...
|
def strip_class(self, el: _Element) -> None: ...
|
||||||
def parse_style(self, el: Any) -> None: ...
|
def parse_style(self, el: _Element) -> None: ...
|
||||||
|
|
||||||
def html_sanitize(src: Any, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ..., sanitize_form: bool = ..., strip_style: bool = ..., strip_classes: bool = ...): ...
|
def html_sanitize(src: str, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ...,
|
||||||
|
sanitize_form: bool = ..., strip_style: bool = ..., strip_classes: bool = ...) -> Markup: ...
|
||||||
|
|
||||||
URL_REGEX: str
|
URL_REGEX: str
|
||||||
TEXT_URL_REGEX: str
|
TEXT_URL_REGEX: str
|
||||||
HTML_TAG_URL_REGEX: Any
|
HTML_TAG_URL_REGEX: str
|
||||||
|
|
||||||
def validate_url(url: Any): ...
|
def validate_url(url: str) -> str: ...
|
||||||
def is_html_empty(html_content: Any): ...
|
def is_html_empty(html_content: str) -> bool: ...
|
||||||
def html_keep_url(text: Any): ...
|
def html_keep_url(text: str) -> str: ...
|
||||||
def html2plaintext(html: Any, body_id: Optional[Any] = ..., encoding: str = ...): ...
|
def html2plaintext(html: str, body_id: str | None = ..., encoding: str = ...) -> str: ...
|
||||||
def plaintext2html(text: Any, container_tag: bool = ...): ...
|
def plaintext2html(text: str, container_tag: str = ...) -> Markup: ...
|
||||||
def append_content_to_html(html: Any, content: Any, plaintext: bool = ..., preserve: bool = ..., container_tag: bool = ...): ...
|
def append_content_to_html(html: str, content: str, plaintext: bool = ..., preserve: bool = ..., container_tag: str = ...) -> Markup: ...
|
||||||
def prepend_html_content(html_body: Any, html_content: Any): ...
|
def prepend_html_content(html_body: str, html_content: str) -> str: ...
|
||||||
|
|
||||||
email_re: Any
|
email_re: Pattern
|
||||||
single_email_re: Any
|
single_email_re: Pattern
|
||||||
mail_header_msgid_re: Any
|
mail_header_msgid_re: Pattern
|
||||||
email_addr_escapes_re: Any
|
email_addr_escapes_re: Pattern
|
||||||
|
|
||||||
def generate_tracking_message_id(res_id: Any): ...
|
def generate_tracking_message_id(res_id: str) -> str: ...
|
||||||
def email_send(email_from: Any, email_to: Any, subject: Any, body: Any, email_cc: Optional[Any] = ..., email_bcc: Optional[Any] = ..., reply_to: bool = ..., attachments: Optional[Any] = ..., message_id: Optional[Any] = ..., references: Optional[Any] = ..., openobject_id: bool = ..., debug: bool = ..., subtype: str = ..., headers: Optional[Any] = ..., smtp_server: Optional[Any] = ..., smtp_port: Optional[Any] = ..., ssl: bool = ..., smtp_user: Optional[Any] = ..., smtp_password: Optional[Any] = ..., cr: Optional[Any] = ..., uid: Optional[Any] = ...): ...
|
def email_send(email_from: str, email_to: str, subject: str, body: str, email_cc: str | None = ..., email_bcc: str | None = ...,
|
||||||
def email_split_tuples(text: Any): ...
|
reply_to: bool = ..., attachments: Any | None = ..., message_id: Any | None = ...,
|
||||||
def email_split(text: Any): ...
|
references: Any | None = ..., openobject_id: bool = ..., debug: bool = ..., subtype: str = ...,
|
||||||
def email_split_and_format(text: Any): ...
|
headers: Any | None = ..., smtp_server: Any | None = ..., smtp_port: Any | None = ...,
|
||||||
def email_normalize(text: Any): ...
|
ssl: bool = ..., smtp_user: Any | None = ..., smtp_password: Any | None = ...,
|
||||||
def email_escape_char(email_address: Any): ...
|
cr: Any | None = ..., uid: Any | None = ...): ...
|
||||||
def decode_message_header(message: Any, header: Any, separator: str = ...): ...
|
def email_split_tuples(text: str) -> list[str]: ...
|
||||||
def formataddr(pair: Any, charset: str = ...): ...
|
def email_split(text: str) -> list[str]: ...
|
||||||
|
def email_split_and_format(text: str) -> list[str]: ...
|
||||||
|
def email_normalize(text: str) -> str | Literal[False]: ...
|
||||||
|
def email_escape_char(email_address: str) -> str: ...
|
||||||
|
def email_domain_extract(email: str) -> str | Literal[False]: ...
|
||||||
|
def decode_message_header(message: Message, header: str, separator: str = ...) -> str: ...
|
||||||
|
def formataddr(pair: tuple[str, str], charset: str = ...) -> str: ...
|
||||||
|
def encapsulate_email(old_email: str, new_email: str) -> str: ...
|
||||||
|
|||||||
@@ -1,28 +1,30 @@
|
|||||||
from collections import namedtuple
|
import collections
|
||||||
from typing import Any
|
from re import Pattern
|
||||||
|
from typing import Any, Literal
|
||||||
|
|
||||||
__all__: Any
|
__all__ = ['guess_mimetype']
|
||||||
_logger: Any
|
_ooxml_dirs: dict[str, str]
|
||||||
_ooxml_dirs: Any
|
|
||||||
|
|
||||||
def _check_ooxml(data: Any): ...
|
def _check_ooxml(data: bytes) -> str | Literal[False]: ...
|
||||||
|
|
||||||
_mime_validator: Any
|
_mime_validator: Pattern
|
||||||
|
|
||||||
def _check_open_container_format(data: Any): ...
|
def _check_open_container_format(data: bytes) -> str | Literal[False]: ...
|
||||||
|
|
||||||
_xls_pattern: Any
|
_xls_pattern: Pattern
|
||||||
_ppt_pattern: Any
|
_ppt_pattern: Pattern
|
||||||
|
|
||||||
def _check_olecf(data: Any): ...
|
def _check_olecf(data: bytes) -> str | Literal[False]: ...
|
||||||
def _check_svg(data: Any): ...
|
def _check_svg(data: bytes) -> str | None: ...
|
||||||
|
|
||||||
_Entry = namedtuple('_Entry', ['mimetype', 'signatures', 'discriminants'])
|
_Entry = collections.namedtuple('_Entry', ['mimetype', 'signatures', 'discriminants'])
|
||||||
_mime_mappings: Any
|
_mime_mappings: tuple[_Entry, ...]
|
||||||
|
|
||||||
def guess_mimetype(bin_data: Any, default: str = ...): ...
|
def guess_mimetype(bin_data: str, default: str | None = ...) -> str: ...
|
||||||
|
|
||||||
guess_mimetype: Any
|
_guesser: Any
|
||||||
ms: Any
|
ms: Any
|
||||||
|
|
||||||
def neuter_mimetype(mimetype: Any, user: Any): ...
|
def neuter_mimetype(mimetype: str, user: 'odoo.model.res_users') -> str: ...
|
||||||
|
|
||||||
|
def get_extension(filename: str) -> str: ...
|
||||||
|
|||||||
@@ -1,208 +1,231 @@
|
|||||||
from .cache import *
|
import datetime
|
||||||
import pickle as pickle_
|
import pickle as pickle_
|
||||||
|
from collections import deque
|
||||||
|
from collections.abc import Mapping, MutableMapping, MutableSet
|
||||||
|
from logging import Filter, LogRecord
|
||||||
|
from types import ModuleType
|
||||||
|
from typing import Any, Collection, Generic, IO, AnyStr, ItemsView, Iterable, Iterator, NoReturn, TypeVar, Callable
|
||||||
|
|
||||||
import xlsxwriter
|
import xlsxwriter
|
||||||
import xlwt
|
import xlwt
|
||||||
from collections.abc import Mapping, MutableMapping, MutableSet
|
from babel.core import Locale
|
||||||
from odoo.loglevels import exception_to_unicode as exception_to_unicode, get_encodings as get_encodings
|
from xlwt import Worksheet
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
_logger: Any
|
from .cache import *
|
||||||
SKIPPED_ELEMENT_TYPES: Any
|
from .parse_version import parse_version as parse_version
|
||||||
|
from ..api import Environment
|
||||||
|
from ..loglevels import exception_to_unicode as exception_to_unicode, get_encodings as get_encodings
|
||||||
|
from ..sql_db import Cursor
|
||||||
|
|
||||||
def find_in_path(name: Any): ...
|
_T = TypeVar('_T')
|
||||||
def _exec_pipe(prog: Any, args: Any, env: Optional[Any] = ...): ...
|
_T1 = TypeVar('_T1')
|
||||||
def exec_command_pipe(name: Any, *args: Any): ...
|
_KT = TypeVar('_KT')
|
||||||
def find_pg_tool(name: Any): ...
|
_VT = TypeVar('_VT')
|
||||||
def exec_pg_environ(): ...
|
_CallableT = TypeVar('_CallableT', bound=Callable)
|
||||||
def exec_pg_command(name: Any, *args: Any) -> None: ...
|
|
||||||
def exec_pg_command_pipe(name: Any, *args: Any): ...
|
SKIPPED_ELEMENT_TYPES: tuple
|
||||||
def file_open(name: Any, mode: str = ..., subdir: str = ..., pathinfo: bool = ...): ...
|
NON_BREAKING_SPACE: str
|
||||||
def _fileopen(path: Any, mode: Any, basedir: Any, pathinfo: Any, basename: Optional[Any] = ...): ...
|
|
||||||
def flatten(list: Any): ...
|
def find_in_path(name: str) -> str: ...
|
||||||
def reverse_enumerate(l: Any): ...
|
def _exec_pipe(prog, args, env: Mapping[str, str] | None = ...) -> tuple[IO[AnyStr] | None, IO[AnyStr] | None]: ...
|
||||||
def partition(pred: Any, elems: Any): ...
|
def exec_command_pipe(name: str, *args) -> tuple[IO[AnyStr] | None, IO[AnyStr] | None]: ...
|
||||||
def topological_sort(elems: Any): ...
|
def find_pg_tool(name: str) -> str: ...
|
||||||
def merge_sequences(*iterables: Any): ...
|
def exec_pg_environ() -> dict[str, str]: ...
|
||||||
|
def exec_pg_command(name: str, *args) -> None: ...
|
||||||
|
def exec_pg_command_pipe(name: str, *args) -> tuple[IO[AnyStr] | None, IO[AnyStr] | None]: ...
|
||||||
|
def file_open(name: str, mode: str = ..., subdir: str = ..., pathinfo: bool = ..., filter_ext: Any | None = ...): ...
|
||||||
|
def _fileopen(path: str, mode: str, basedir: str, pathinfo, basename: str | None = ..., filter_ext: Any | None = ...): ...
|
||||||
|
def flatten(list) -> list: ...
|
||||||
|
def reverse_enumerate(l): ...
|
||||||
|
def partition(pred: Callable[[_T], bool], elems: Iterable[_T]) -> tuple[list[_T], list[_T]]: ...
|
||||||
|
def topological_sort(elems: dict[_T, Any]) -> list[_T]: ...
|
||||||
|
def merge_sequences(*iterables: Iterable[_T]) -> list[_T]: ...
|
||||||
|
|
||||||
class PatchedWorkbook(xlwt.Workbook):
|
class PatchedWorkbook(xlwt.Workbook):
|
||||||
def add_sheet(self, name: Any, cell_overwrite_ok: bool = ...): ...
|
def add_sheet(self, name: str, cell_overwrite_ok: bool = ...) -> Worksheet: ...
|
||||||
|
|
||||||
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
|
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
|
||||||
def add_worksheet(self, name: Optional[Any] = ..., **kw: Any): ...
|
def add_worksheet(self, name: str | None = ..., **kw) -> Worksheet: ...
|
||||||
|
|
||||||
def to_xml(s: Any): ...
|
def to_xml(s: str) -> str: ...
|
||||||
def get_iso_codes(lang: Any): ...
|
def get_iso_codes(lang: str) -> str: ...
|
||||||
def scan_languages(): ...
|
def scan_languages() -> list[tuple[str, str]]: ...
|
||||||
def mod10r(number: Any): ...
|
def mod10r(number: str) -> str: ...
|
||||||
def str2bool(s: Any, default: Optional[Any] = ...): ...
|
def str2bool(s: str, default: Any | None = ...) -> bool: ...
|
||||||
def human_size(sz: Any): ...
|
def human_size(sz) -> str: ...
|
||||||
def logged(f: Any): ...
|
def logged(f: _CallableT) -> _CallableT: ...
|
||||||
|
|
||||||
class profile:
|
class profile:
|
||||||
fname: Any = ...
|
fname: str | None
|
||||||
def __init__(self, fname: Optional[Any] = ...) -> None: ...
|
def __init__(self, fname: str | None = ...) -> None: ...
|
||||||
def __call__(self, f: Any): ...
|
def __call__(self, f: _CallableT) -> _CallableT: ...
|
||||||
|
|
||||||
def detect_ip_addr(): ...
|
def detect_ip_addr() -> str: ...
|
||||||
|
|
||||||
DEFAULT_SERVER_DATE_FORMAT: str
|
DEFAULT_SERVER_DATE_FORMAT: str
|
||||||
DEFAULT_SERVER_TIME_FORMAT: str
|
DEFAULT_SERVER_TIME_FORMAT: str
|
||||||
DEFAULT_SERVER_DATETIME_FORMAT: Any
|
DEFAULT_SERVER_DATETIME_FORMAT: str
|
||||||
DATE_LENGTH: Any
|
DATE_LENGTH: int
|
||||||
DATETIME_FORMATS_MAP: Any
|
DATETIME_FORMATS_MAP: dict[str, str]
|
||||||
POSIX_TO_LDML: Any
|
POSIX_TO_LDML: dict[str, str]
|
||||||
|
|
||||||
def posix_to_ldml(fmt: Any, locale: Any): ...
|
def posix_to_ldml(fmt: str, locale: Locale) -> str: ...
|
||||||
def split_every(n: Any, iterable: Any, piece_maker: Any = ...) -> None: ...
|
def split_every(n: int, iterable: Iterable[_T], piece_maker: Callable[[Iterable[_T]], _T1] = ...) -> Iterator[_T1]: ...
|
||||||
def get_and_group_by_field(cr: Any, uid: Any, obj: Any, ids: Any, field: Any, context: Optional[Any] = ...): ...
|
def get_and_group_by_field(cr: Cursor, uid: int, obj, ids, field: str, context: dict | None = ...) -> dict: ...
|
||||||
def get_and_group_by_company(cr: Any, uid: Any, obj: Any, ids: Any, context: Optional[Any] = ...): ...
|
def get_and_group_by_company(cr: Cursor, uid: int, obj, ids, context: dict | None = ...) -> dict: ...
|
||||||
def resolve_attr(obj: Any, attr: Any): ...
|
def resolve_attr(obj, attr: str): ...
|
||||||
def attrgetter(*items: Any): ...
|
def attrgetter(*items): ...
|
||||||
def remove_accents(input_str: Any): ...
|
def remove_accents(input_str: str) -> str: ...
|
||||||
|
|
||||||
class unquote(str):
|
class unquote(str):
|
||||||
def __repr__(self): ...
|
def __repr__(self) -> str: ...
|
||||||
|
|
||||||
class UnquoteEvalContext(defaultdict):
|
class UnquoteEvalContext(defaultdict):
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args, **kwargs) -> None: ...
|
||||||
def __missing__(self, key: Any): ...
|
def __missing__(self, key) -> unquote: ...
|
||||||
|
|
||||||
class mute_logger:
|
class mute_logger(Filter):
|
||||||
loggers: Any = ...
|
loggers: tuple[str]
|
||||||
def __init__(self, *loggers: Any) -> None: ...
|
def __init__(self, *loggers: str) -> None: ...
|
||||||
def filter(self, record: Any): ...
|
def filter(self, record: LogRecord) -> int: ...
|
||||||
def __enter__(self) -> None: ...
|
def __enter__(self) -> None: ...
|
||||||
def __exit__(self, exc_type: Optional[Any] = ..., exc_val: Optional[Any] = ..., exc_tb: Optional[Any] = ...) -> None: ...
|
def __exit__(self, exc_type: Any | None = ..., exc_val: Any | None = ..., exc_tb: Any | None = ...) -> None: ...
|
||||||
def __call__(self, func: Any): ...
|
def __call__(self, func: _CallableT) -> _CallableT: ...
|
||||||
|
|
||||||
_ph: Any
|
_ph: Any
|
||||||
|
|
||||||
class CountingStream:
|
class CountingStream(Generic[_T]):
|
||||||
stream: Any = ...
|
stream: Iterator[_T]
|
||||||
index: Any = ...
|
index: int
|
||||||
stopped: bool = ...
|
stopped: bool
|
||||||
def __init__(self, stream: Any, start: int = ...) -> None: ...
|
def __init__(self, stream: Iterable[_T], start: int = ...) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> CountingStream[_T]: ...
|
||||||
def next(self): ...
|
def next(self) -> _T: ...
|
||||||
__next__: Any = ...
|
__next__ = next
|
||||||
|
|
||||||
def stripped_sys_argv(*strip_args: Any): ...
|
def stripped_sys_argv(*strip_args: str) -> list[str]: ...
|
||||||
|
|
||||||
class ConstantMapping(Mapping):
|
class ConstantMapping(Mapping[_KT, _VT]):
|
||||||
__slots__: Any = ...
|
__slots__ = ['_value']
|
||||||
_value: Any = ...
|
_value: _VT
|
||||||
def __init__(self, val: Any) -> None: ...
|
def __init__(self, val: _VT) -> None: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator: ...
|
||||||
def __getitem__(self, item: Any): ...
|
def __getitem__(self, item) -> _VT: ...
|
||||||
|
|
||||||
def dumpstacks(sig: Optional[Any] = ..., frame: Optional[Any] = ..., thread_idents: Optional[Any] = ...) -> None: ...
|
def dumpstacks(sig: Any | None = ..., frame: Any | None = ..., thread_idents: Any | None = ...) -> None: ...
|
||||||
def freehash(arg: Any): ...
|
def freehash(arg) -> int: ...
|
||||||
def clean_context(context: Any): ...
|
def clean_context(context: dict[str, Any]) -> dict[str, Any]: ...
|
||||||
|
|
||||||
class frozendict(dict):
|
class frozendict(dict):
|
||||||
def __delitem__(self, key: Any) -> None: ...
|
def __delitem__(self, key) -> NoReturn: ...
|
||||||
def __setitem__(self, key: Any, val: Any) -> None: ...
|
def __setitem__(self, key, val) -> NoReturn: ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> NoReturn: ...
|
||||||
def pop(self, key: Any, default: Optional[Any] = ...) -> None: ...
|
def pop(self, key, default: Any | None = ...) -> NoReturn: ...
|
||||||
def popitem(self) -> None: ...
|
def popitem(self) -> NoReturn: ...
|
||||||
def setdefault(self, key: Any, default: Optional[Any] = ...) -> None: ...
|
def setdefault(self, key, default: Any | None = ...) -> NoReturn: ...
|
||||||
def update(self, *args: Any, **kwargs: Any) -> None: ...
|
def update(self, *args, **kwargs) -> NoReturn: ...
|
||||||
def __hash__(self) -> Any: ...
|
def __hash__(self) -> int: ...
|
||||||
|
|
||||||
class Collector(Mapping):
|
class Collector(Mapping[_KT, _VT]):
|
||||||
__slots__: Any = ...
|
__slots__ = ['map']
|
||||||
_map: Any = ...
|
_map: dict
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
def add(self, key: Any, val: Any) -> None: ...
|
def add(self, key: _KT, val: _T) -> None: ...
|
||||||
def __getitem__(self, key: Any): ...
|
def __getitem__(self, key: _KT) -> tuple[_T]: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator[_KT]: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
|
def discard_keys_and_values(self, excludes: Collection): ...
|
||||||
|
|
||||||
class StackMap(MutableMapping):
|
class StackMap(MutableMapping):
|
||||||
__slots__: Any = ...
|
__slots__ = ['_maps']
|
||||||
_maps: Any = ...
|
_maps: list[MutableMapping]
|
||||||
def __init__(self, m: Optional[Any] = ...) -> None: ...
|
def __init__(self, m: MutableMapping | None = ...) -> None: ...
|
||||||
def __getitem__(self, key: Any): ...
|
def __getitem__(self, key): ...
|
||||||
def __setitem__(self, key: Any, val: Any) -> None: ...
|
def __setitem__(self, key, val) -> None: ...
|
||||||
def __delitem__(self, key: Any) -> None: ...
|
def __delitem__(self, key) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def __str__(self): ...
|
def __str__(self) -> str: ...
|
||||||
def pushmap(self, m: Optional[Any] = ...) -> None: ...
|
def pushmap(self, m: MutableMapping | None = ...) -> None: ...
|
||||||
def popmap(self): ...
|
def popmap(self) -> MutableMapping: ...
|
||||||
|
|
||||||
class OrderedSet(MutableSet):
|
class OrderedSet(MutableSet):
|
||||||
__slots__: Any = ...
|
__slots__ = ['_map']
|
||||||
_map: Any = ...
|
_map: dict
|
||||||
def __init__(self, elems: Any = ...) -> None: ...
|
def __init__(self, elems: Iterable = ...) -> None: ...
|
||||||
def __contains__(self, elem: Any): ...
|
def __contains__(self, elem) -> bool: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def add(self, elem: Any) -> None: ...
|
def add(self, elem) -> None: ...
|
||||||
def discard(self, elem: Any) -> None: ...
|
def discard(self, elem) -> None: ...
|
||||||
|
|
||||||
class LastOrderedSet(OrderedSet):
|
class LastOrderedSet(OrderedSet):
|
||||||
def add(self, elem: Any) -> None: ...
|
def add(self, elem) -> None: ...
|
||||||
|
|
||||||
class Callbacks:
|
class Callbacks:
|
||||||
__slots__: Any = ...
|
__slots__ = ['_funcs', 'data']
|
||||||
_funcs: Any = ...
|
_funcs: deque
|
||||||
data: Any = ...
|
data: dict
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
def add(self, func: Any) -> None: ...
|
def add(self, func: Callable) -> None: ...
|
||||||
def run(self) -> None: ...
|
def run(self) -> None: ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
|
|
||||||
class IterableGenerator:
|
class IterableGenerator(Generic[_T]):
|
||||||
__slots__: Any = ...
|
__slots__ = ['func', 'args']
|
||||||
func: Any = ...
|
func: Callable
|
||||||
args: Any = ...
|
args: tuple
|
||||||
def __init__(self, func: Any, *args: Any) -> None: ...
|
def __init__(self, func: Callable[..., _T], *args) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> _T: ...
|
||||||
|
|
||||||
def groupby(iterable: Any, key: Optional[Any] = ...): ...
|
def groupby(iterable: Iterable[_T], key: Callable[..., _T1] | None = ...) -> ItemsView[_T1, _T]: ...
|
||||||
def unique(it: Any) -> None: ...
|
def unique(it: Iterable[_T]) -> Iterator[_T]: ...
|
||||||
|
|
||||||
class Reverse:
|
class Reverse:
|
||||||
__slots__: Any = ...
|
__slots__ = ['val']
|
||||||
val: Any = ...
|
val: Any
|
||||||
def __init__(self, val: Any) -> None: ...
|
def __init__(self, val) -> None: ...
|
||||||
def __eq__(self, other: Any) -> Any: ...
|
def __eq__(self, other) -> bool: ...
|
||||||
def __ne__(self, other: Any) -> Any: ...
|
def __ne__(self, other) -> bool: ...
|
||||||
def __ge__(self, other: Any) -> Any: ...
|
def __ge__(self, other) -> bool: ...
|
||||||
def __gt__(self, other: Any) -> Any: ...
|
def __gt__(self, other) -> bool: ...
|
||||||
def __le__(self, other: Any) -> Any: ...
|
def __le__(self, other) -> bool: ...
|
||||||
def __lt__(self, other: Any) -> Any: ...
|
def __lt__(self, other) -> bool: ...
|
||||||
|
|
||||||
def ignore(*exc: Any) -> None: ...
|
def ignore(*exc) -> None: ...
|
||||||
def html_escape(text: Any): ...
|
def html_escape(text: str) -> str: ...
|
||||||
def get_lang(env: Any, lang_code: str = ...): ...
|
def get_lang(env: Environment, lang_code: str = ...) -> 'odoo.model.res_lang': ...
|
||||||
def formatLang(env: Any, value: Any, digits: Optional[Any] = ..., grouping: bool = ..., monetary: bool = ..., dp: bool = ..., currency_obj: bool = ...): ...
|
def babel_locale_parse(lang_code: str) -> Locale: ...
|
||||||
def format_date(env: Any, value: Any, lang_code: str = ..., date_format: bool = ...): ...
|
def formatLang(env: Environment, value, digits: int | None = ..., grouping: bool = ..., monetary: bool = ...,
|
||||||
def parse_date(env: Any, value: Any, lang_code: str = ...): ...
|
dp: bool = ..., currency_obj: 'odoo.model.res_currency' = ...) -> str: ...
|
||||||
def format_datetime(env: Any, value: Any, tz: str = ..., dt_format: str = ..., lang_code: str = ...): ...
|
def format_date(env: Environment, value: datetime.date | datetime.datetime | str, lang_code: str = ...,
|
||||||
def format_time(env: Any, value: Any, tz: str = ..., time_format: str = ..., lang_code: str = ...): ...
|
date_format: str = ...) -> str: ...
|
||||||
def _format_time_ago(env: Any, time_delta: Any, lang_code: str = ..., add_direction: bool = ...): ...
|
def parse_date(env: Environment, value: str, lang_code: str = ...) -> datetime.date: ...
|
||||||
def format_decimalized_number(number: Any, decimal: int = ...): ...
|
def format_datetime(env: Environment, value: str | datetime.datetime, tz: str = ...,
|
||||||
def format_decimalized_amount(amount: Any, currency: Optional[Any] = ...): ...
|
dt_format: str = ..., lang_code: str = ...) -> str: ...
|
||||||
def format_amount(env: Any, amount: Any, currency: Any, lang_code: str = ...): ...
|
def format_time(env: Environment, value, tz: str = ..., time_format: str = ..., lang_code: str = ...) -> str: ...
|
||||||
def format_duration(value: Any): ...
|
def _format_time_ago(env: Environment, time_delta: datetime.timedelta | int, lang_code: str = ...,
|
||||||
def _consteq(str1: Any, str2: Any): ...
|
add_direction: bool = ...) -> str: ...
|
||||||
|
def format_decimalized_number(number: float, decimal: int = ...) -> str: ...
|
||||||
|
def format_decimalized_amount(amount: float, currency: 'odoo.model.res_currency | None' = ...) -> str: ...
|
||||||
|
def format_amount(env: Environment, amount: float, currency: 'odoo.model.res_currency', lang_code: str = ...) -> str: ...
|
||||||
|
def format_duration(value: float) -> str: ...
|
||||||
|
def _consteq(str1: str, str2: str) -> bool: ...
|
||||||
|
|
||||||
consteq: Any
|
consteq: Callable[[str, str], bool]
|
||||||
|
|
||||||
class Unpickler(pickle_.Unpickler):
|
class Unpickler(pickle_.Unpickler):
|
||||||
find_global: Any = ...
|
find_global: Any
|
||||||
find_class: Any = ...
|
find_class: Any
|
||||||
|
|
||||||
def _pickle_load(stream: Any, encoding: str = ..., errors: bool = ...): ...
|
def _pickle_load(stream: pickle_._ReadableFileobj, encoding: str = ..., errors: bool = ...): ...
|
||||||
|
|
||||||
pickle: Any
|
pickle: ModuleType
|
||||||
|
|
||||||
class DotDict(dict):
|
class DotDict(dict):
|
||||||
def __getattr__(self, attrib: Any): ...
|
def __getattr__(self, attrib): ...
|
||||||
|
|
||||||
def get_diff(data_from: Any, data_to: Any, custom_style: bool = ...): ...
|
def get_diff(data_from: tuple[str, str], data_to: tuple[str, str], custom_style: bool = ...) -> str: ...
|
||||||
def traverse_containers(val: Any, type_: Any) -> None: ...
|
def traverse_containers(val, type_) -> Iterator: ...
|
||||||
def hmac(env: Any, scope: Any, message: Any, hash_function: Any = ...): ...
|
def hmac(env: Environment, scope, message, hash_function = ...) -> str: ...
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
from typing import Any, Optional
|
from typing import Any, BinaryIO, Callable, Generator, Iterable, Iterator
|
||||||
|
|
||||||
_logger: Any
|
def listdir(dir: str, recursive: bool = ...) -> Iterable[str]: ...
|
||||||
|
def walksymlinks(top: str, topdown: bool = ..., onerror: Callable[[OSError], Any] | None = ...) -> Iterator[tuple[str, list[str], list[str]]]: ...
|
||||||
|
def tempdir() -> Generator[str, None, None]: ...
|
||||||
|
def zip_dir(path: str, stream: str | BinaryIO, include_dir: bool = ..., fnct_sort: Callable | None = ...) -> None: ...
|
||||||
|
|
||||||
def listdir(dir: Any, recursive: bool = ...): ...
|
getppid: Callable[[], int]
|
||||||
def walksymlinks(top: Any, topdown: bool = ..., onerror: Optional[Any] = ...): ...
|
is_running_as_nt_service: Callable[[], bool]
|
||||||
def tempdir() -> None: ...
|
|
||||||
def zip_dir(path: Any, stream: Any, include_dir: bool = ..., fnct_sort: Optional[Any] = ...) -> None: ...
|
|
||||||
|
|
||||||
getppid: Any
|
|
||||||
is_running_as_nt_service: Any
|
|
||||||
_TH32CS_SNAPPROCESS: int
|
_TH32CS_SNAPPROCESS: int
|
||||||
|
|
||||||
class _PROCESSENTRY32(ctypes.Structure):
|
class _PROCESSENTRY32(ctypes.Structure):
|
||||||
_fields_: Any = ...
|
_fields_: list[tuple[str, Any]]
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from typing import Any
|
from re import Pattern
|
||||||
|
from typing import Callable, Iterator
|
||||||
|
|
||||||
component_re: Any
|
component_re: Pattern
|
||||||
replace: Any
|
replace: Callable
|
||||||
|
|
||||||
def _parse_version_parts(s: Any) -> None: ...
|
def _parse_version_parts(s: str) -> Iterator[str]: ...
|
||||||
def parse_version(s: Any): ...
|
def parse_version(s: str) -> tuple[str]: ...
|
||||||
|
|||||||
@@ -1,24 +1,36 @@
|
|||||||
|
from io import BytesIO
|
||||||
|
from re import Pattern
|
||||||
|
from typing import Any, BinaryIO, Iterable
|
||||||
|
|
||||||
from PyPDF2 import PdfFileReader, PdfFileWriter
|
from PyPDF2 import PdfFileReader, PdfFileWriter
|
||||||
from PyPDF2.generic import ArrayObject as ArrayObject
|
from PyPDF2.generic import ArrayObject as ArrayObject, IndirectObject
|
||||||
from PyPDF2.utils import b_ as b_
|
from PyPDF2.utils import b_ as b_
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
DEFAULT_PDF_DATETIME_FORMAT: str
|
DEFAULT_PDF_DATETIME_FORMAT: str
|
||||||
|
REGEX_SUBTYPE_UNFORMATED: Pattern
|
||||||
|
REGEX_SUBTYPE_FORMATED: Pattern
|
||||||
|
|
||||||
def _unwrapping_get(self, key: Any, default: Optional[Any] = ...): ...
|
def _unwrapping_get(self, key, default: Any | None = ...): ...
|
||||||
|
|
||||||
class BrandedFileWriter(PdfFileWriter):
|
class BrandedFileWriter(PdfFileWriter):
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
PdfFileWriter = BrandedFileWriter
|
PdfFileWriter = BrandedFileWriter
|
||||||
|
|
||||||
def merge_pdf(pdf_data: Any): ...
|
def merge_pdf(pdf_data: Iterable[bytes]) -> bytes: ...
|
||||||
def rotate_pdf(pdf: Any): ...
|
def rotate_pdf(pdf: bytes) -> bytes: ...
|
||||||
|
|
||||||
old_init: Any
|
|
||||||
|
|
||||||
class OdooPdfFileReader(PdfFileReader):
|
class OdooPdfFileReader(PdfFileReader):
|
||||||
def getAttachments(self): ...
|
def getAttachments(self) -> Iterable[tuple[Any, Any]]: ...
|
||||||
|
|
||||||
class OdooPdfFileWriter(PdfFileWriter):
|
class OdooPdfFileWriter(PdfFileWriter):
|
||||||
def _create_attachment_object(self, attachment: Any): ...
|
_reader: PdfFileReader | None
|
||||||
def addAttachment(self, fname: Any, fdata: Any) -> None: ...
|
is_pdfa: bool
|
||||||
|
_header: bytes
|
||||||
|
_ID: Any
|
||||||
|
def __init__(self, *args, **kwargs): None
|
||||||
|
def addAttachment(self, fname: str, fdata, subtype: str | None = ...) -> None: ...
|
||||||
|
def embed_odoo_attachment(self, attachment: 'odoo.model.ir_attachment', subtype: str | None = ...) -> None: ...
|
||||||
|
def cloneReaderDocumentRoot(self, reader: PdfFileReader) -> None: ...
|
||||||
|
def convert_to_pdfa(self) -> None: ...
|
||||||
|
def add_file_metadata(self, metadata_content: bytes) -> None: ...
|
||||||
|
def _create_attachment_object(self, attachment: dict[str, Any]) -> IndirectObject: ...
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
from datetime import datetime as datetime, timedelta as timedelta
|
import random
|
||||||
from odoo.tools import pycompat as pycompat
|
from typing import Any, Callable, Iterable, Iterator, Sequence, TypeVar
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
def Random(seed: Any): ...
|
from ..tools import pycompat as pycompat
|
||||||
def format_str(val: Any, counter: Any, values: Any): ...
|
|
||||||
def chain_factories(field_factories: Any, model_name: Any): ...
|
_T = TypeVar('_T')
|
||||||
def root_factory() -> None: ...
|
|
||||||
def randomize(vals: Any, weights: Optional[Any] = ..., seed: bool = ..., formatter: Any = ..., counter_offset: int = ...): ...
|
def Random(seed) -> random.Random: ...
|
||||||
def cartesian(vals: Any, weights: Optional[Any] = ..., seed: bool = ..., formatter: Any = ..., then: Optional[Any] = ...): ...
|
def format_str(val: _T, counter, values) -> _T: ...
|
||||||
def iterate(vals: Any, weights: Optional[Any] = ..., seed: bool = ..., formatter: Any = ..., then: Optional[Any] = ...): ...
|
def chain_factories(field_factories: Iterable[tuple[str, Callable[..., Iterator]]], model_name: str) -> Iterator: ...
|
||||||
def constant(val: Any, formatter: Any = ...): ...
|
def root_factory() -> Iterator[dict]: ...
|
||||||
def compute(function: Any, seed: Optional[Any] = ...): ...
|
def randomize(vals: Sequence, weights: Sequence | None = ..., seed: Any = ..., formatter: Callable[[Any, Any, Any], Any] = ...,
|
||||||
def randint(a: Any, b: Any, seed: Optional[Any] = ...): ...
|
counter_offset: int = ...) -> Callable[[Iterable, str, str], dict]: ...
|
||||||
|
def cartesian(vals: Sequence, weights: Sequence | None = ..., seed: Any = ..., formatter: Callable[[Any, Any, Any], Any] = ...,
|
||||||
|
then: Callable[[Iterable, str, str], dict] | None = ...) -> Callable[[Iterable, str, str], Iterator[dict]]: ...
|
||||||
|
def iterate(vals: Sequence, weights: Sequence | None = ..., seed: Any = ..., formatter: Callable[[Any, Any, Any], Any] = ...,
|
||||||
|
then: Callable[[Iterable, str, str], dict] | None = ...) -> Callable[[Iterable, str, str], Iterator[dict]]: ...
|
||||||
|
def constant(val: Sequence, formatter: Callable[[Any, Any, Any], Any] = ...) -> Callable[[Iterable, str, str], Iterator[dict]]: ...
|
||||||
|
def compute(function: Callable[[Any, Any, Any], Any], seed: Any | None = ...) -> Callable[[Iterable, str, str], Iterator[dict]]: ...
|
||||||
|
def randint(a: int, b: int, seed: Any | None = ...) -> Callable[[Iterable, str, str], Iterator[dict]]: ...
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
_logger: Any
|
|
||||||
|
|
||||||
class _LogTracer:
|
class _LogTracer:
|
||||||
profiles: Any = ...
|
profiles: dict
|
||||||
whitelist: Any = ...
|
whitelist: Any
|
||||||
blacklist: Any = ...
|
blacklist: Any
|
||||||
files: Any = ...
|
files: Any
|
||||||
deep: Any = ...
|
deep: Any
|
||||||
first_frame: Any = ...
|
first_frame: Any
|
||||||
def __init__(self, whitelist: Optional[Any] = ..., blacklist: Optional[Any] = ..., files: Optional[Any] = ..., deep: bool = ...) -> None: ...
|
def __init__(self, whitelist: Any | None = ..., blacklist: Any | None = ..., files: Any | None = ..., deep: bool = ...) -> None: ...
|
||||||
def tracer(self, frame: Any, event: Any, arg: Any): ...
|
def tracer(self, frame, event, arg): ...
|
||||||
|
|
||||||
def profile(method: Optional[Any] = ..., whitelist: Optional[Any] = ..., blacklist: Any = ..., files: Optional[Any] = ..., minimum_time: int = ..., minimum_queries: int = ...): ...
|
def profile(method: Any | None = ..., whitelist: Any | None = ..., blacklist=..., files: Any | None = ..., minimum_time: int = ..., minimum_queries: int = ...): ...
|
||||||
|
|||||||
@@ -1,8 +1,26 @@
|
|||||||
from typing import Any
|
from codecs import StreamReader, StreamWriter
|
||||||
|
from csv import Dialect
|
||||||
|
from typing import BinaryIO, Iterable, Iterator, Protocol
|
||||||
|
|
||||||
_reader: Any
|
class _StreamReader(Protocol):
|
||||||
_writer: Any
|
def __call__(self, stream: BinaryIO, errors: str = ...) -> StreamReader: ...
|
||||||
|
|
||||||
def csv_reader(stream: Any, **params: Any): ...
|
class _StreamWriter(Protocol):
|
||||||
def csv_writer(stream: Any, **params: Any): ...
|
def __call__(self, stream: BinaryIO, errors: str = ...) -> StreamWriter: ...
|
||||||
def to_text(source: Any): ...
|
|
||||||
|
class _CsvReader(Iterator[list[str]]):
|
||||||
|
dialect: Dialect
|
||||||
|
line_num: int
|
||||||
|
def __next__(self) -> list[str]: ...
|
||||||
|
|
||||||
|
class _CsvWriter:
|
||||||
|
dialect: Dialect
|
||||||
|
def writerow(self, row: Iterable): ...
|
||||||
|
def writerows(self, rows: Iterable[Iterable]) -> None: ...
|
||||||
|
|
||||||
|
_reader: _StreamReader
|
||||||
|
_writer: _StreamWriter
|
||||||
|
|
||||||
|
def csv_reader(stream: BinaryIO, **params) -> _CsvReader: ...
|
||||||
|
def csv_writer(stream: BinaryIO, **params) -> _CsvWriter: ...
|
||||||
|
def to_text(source) -> str: ...
|
||||||
|
|||||||
@@ -1,40 +1,41 @@
|
|||||||
from opcode import HAVE_ARGUMENT as HAVE_ARGUMENT
|
from opcode import HAVE_ARGUMENT as HAVE_ARGUMENT
|
||||||
from typing import Any, Optional
|
from types import CodeType
|
||||||
|
from typing import Any, Iterable, Iterator, Literal
|
||||||
|
|
||||||
unsafe_eval = eval
|
unsafe_eval = eval
|
||||||
__all__: Any
|
_ALLOWED_MODULES: list[str]
|
||||||
_ALLOWED_MODULES: Any
|
_UNSAFE_ATTRIBUTES: list[str]
|
||||||
_UNSAFE_ATTRIBUTES: Any
|
|
||||||
|
|
||||||
def to_opcodes(opnames: Any, _opmap: Any = ...) -> None: ...
|
def to_opcodes(opnames: Iterable[str], _opmap: dict[str, int] =...) -> Iterator[int]: ...
|
||||||
|
|
||||||
_BLACKLIST: Any
|
_BLACKLIST: set[int]
|
||||||
_CONST_OPCODES: Any
|
_CONST_OPCODES: set[int]
|
||||||
_operations: Any
|
_operations: list[str]
|
||||||
_EXPR_OPCODES: Any
|
_EXPR_OPCODES: set[int]
|
||||||
_SAFE_OPCODES: Any
|
_SAFE_OPCODES: set[int]
|
||||||
_logger: Any
|
|
||||||
|
|
||||||
def assert_no_dunder_name(code_obj: Any, expr: Any) -> None: ...
|
def assert_no_dunder_name(code_obj: CodeType, expr: str) -> None: ...
|
||||||
def assert_valid_codeobj(allowed_codes: Any, code_obj: Any, expr: Any) -> None: ...
|
def assert_valid_codeobj(allowed_codes: set[int], code_obj: CodeType, expr: str) -> None: ...
|
||||||
def test_expr(expr: Any, allowed_codes: Any, mode: str = ...): ...
|
def test_expr(expr: str, allowed_codes: set[int], mode: str = ...): ...
|
||||||
def const_eval(expr: Any): ...
|
def const_eval(expr: str): ...
|
||||||
def expr_eval(expr: Any): ...
|
def expr_eval(expr: str): ...
|
||||||
def _import(name: Any, globals: Optional[Any] = ..., locals: Optional[Any] = ..., fromlist: Optional[Any] = ..., level: int = ...): ...
|
def _import(name: str, globals: dict | None = ..., locals: dict | None = ..., fromlist: list | None = ..., level: int = ...): ...
|
||||||
|
|
||||||
_BUILTINS: Any
|
_BUILTINS: dict[str, Any]
|
||||||
|
|
||||||
def safe_eval(expr: Any, globals_dict: Optional[Any] = ..., locals_dict: Optional[Any] = ..., mode: str = ..., nocopy: bool = ..., locals_builtins: bool = ...): ...
|
def safe_eval(expr: str, globals_dict: dict | None = ..., locals_dict: dict | None = ..., mode: str = ...,
|
||||||
def test_python_expr(expr: Any, mode: str = ...): ...
|
nocopy: bool = ..., locals_builtins: bool = ...): ...
|
||||||
def check_values(d: Any): ...
|
def test_python_expr(expr: str, mode: str = ...) -> str | Literal[False]: ...
|
||||||
|
def check_values(d: dict): ...
|
||||||
|
|
||||||
class wrap_module:
|
class wrap_module:
|
||||||
_repr: Any = ...
|
_repr: str
|
||||||
def __init__(self, module: Any, attributes: Any) -> None: ...
|
def __init__(self, module, attributes) -> None: ...
|
||||||
def __repr__(self): ...
|
def __repr__(self) -> str: ...
|
||||||
|
def __getattr__(self, item): ...
|
||||||
|
|
||||||
mods: Any
|
mods: list[str]
|
||||||
datetime: Any
|
datetime: wrap_module
|
||||||
json: Any
|
json: wrap_module
|
||||||
time: Any
|
time: wrap_module
|
||||||
pytz: Any
|
pytz: wrap_module
|
||||||
|
|||||||
@@ -1,30 +1,33 @@
|
|||||||
from typing import Any, Optional
|
from typing import Iterable, Literal
|
||||||
|
|
||||||
_schema: Any
|
from ..models import BaseModel
|
||||||
_CONFDELTYPES: Any
|
from ..sql_db import Cursor
|
||||||
|
|
||||||
def existing_tables(cr: Any, tablenames: Any): ...
|
_CONFDELTYPES: dict[str, str]
|
||||||
def table_exists(cr: Any, tablename: Any): ...
|
|
||||||
def table_kind(cr: Any, tablename: Any): ...
|
def existing_tables(cr: Cursor, tablenames: Iterable[str]) -> list[str]: ...
|
||||||
def create_model_table(cr: Any, tablename: Any, comment: Optional[Any] = ..., columns: Any = ...) -> None: ...
|
def table_exists(cr: Cursor, tablename: str) -> bool: ...
|
||||||
def table_columns(cr: Any, tablename: Any): ...
|
def table_kind(cr: Cursor, tablename: str) -> str | None: ...
|
||||||
def column_exists(cr: Any, tablename: Any, columnname: Any): ...
|
def create_model_table(cr: Cursor, tablename: str, comment: str | None = ..., columns: Iterable = ...) -> None: ...
|
||||||
def create_column(cr: Any, tablename: Any, columnname: Any, columntype: Any, comment: Optional[Any] = ...) -> None: ...
|
def table_columns(cr: Cursor, tablename: str) -> dict: ...
|
||||||
def rename_column(cr: Any, tablename: Any, columnname1: Any, columnname2: Any) -> None: ...
|
def column_exists(cr: Cursor, tablename: str, columnname: str) -> int: ...
|
||||||
def convert_column(cr: Any, tablename: Any, columnname: Any, columntype: Any) -> None: ...
|
def create_column(cr: Cursor, tablename: str, columnname: str, columntype: str, comment: str | None = ...) -> None: ...
|
||||||
def set_not_null(cr: Any, tablename: Any, columnname: Any) -> None: ...
|
def rename_column(cr: Cursor, tablename: str, columnname1: str, columnname2: str) -> None: ...
|
||||||
def drop_not_null(cr: Any, tablename: Any, columnname: Any) -> None: ...
|
def convert_column(cr: Cursor, tablename: str, columnname: str, columntype: str) -> None: ...
|
||||||
def constraint_definition(cr: Any, tablename: Any, constraintname: Any): ...
|
def set_not_null(cr: Cursor, tablename: str, columnname: str) -> None: ...
|
||||||
def add_constraint(cr: Any, tablename: Any, constraintname: Any, definition: Any) -> None: ...
|
def drop_not_null(cr: Cursor, tablename: str, columnname: str) -> None: ...
|
||||||
def drop_constraint(cr: Any, tablename: Any, constraintname: Any) -> None: ...
|
def constraint_definition(cr: Cursor, tablename: str, constraintname: str) -> str | None: ...
|
||||||
def add_foreign_key(cr: Any, tablename1: Any, columnname1: Any, tablename2: Any, columnname2: Any, ondelete: Any): ...
|
def add_constraint(cr: Cursor, tablename: str, constraintname: str, definition: str) -> None: ...
|
||||||
def fix_foreign_key(cr: Any, tablename1: Any, columnname1: Any, tablename2: Any, columnname2: Any, ondelete: Any): ...
|
def drop_constraint(cr: Cursor, tablename: str, constraintname: str) -> None: ...
|
||||||
def index_exists(cr: Any, indexname: Any): ...
|
def add_foreign_key(cr: Cursor, tablename1: str, columnname1: str, tablename2: str, columnname2: str, ondelete) -> Literal[True]: ...
|
||||||
def create_index(cr: Any, indexname: Any, tablename: Any, expressions: Any) -> None: ...
|
def get_foreign_keys(cr: Cursor, tablename1: str, columnname1: str, tablename2: str, columnname2: str, ondelete) -> list[str]: ...
|
||||||
def create_unique_index(cr: Any, indexname: Any, tablename: Any, expressions: Any) -> None: ...
|
def fix_foreign_key(cr: Cursor, tablename1: str, columnname1: str, tablename2: str, columnname2: str, ondelete) -> list[str]: ...
|
||||||
def drop_index(cr: Any, indexname: Any, tablename: Any) -> None: ...
|
def index_exists(cr: Cursor, indexname: str) -> int: ...
|
||||||
def drop_view_if_exists(cr: Any, viewname: Any) -> None: ...
|
def create_index(cr: Cursor, indexname: str, tablename: str, expressions: Iterable[str]) -> None: ...
|
||||||
def escape_psql(to_escape: Any): ...
|
def create_unique_index(cr: Cursor, indexname: str, tablename: str, expressions: Iterable[str]) -> None: ...
|
||||||
def pg_varchar(size: int = ...): ...
|
def drop_index(cr: Cursor, indexname: str, tablename: str) -> None: ...
|
||||||
def reverse_order(order: Any): ...
|
def drop_view_if_exists(cr: Cursor, viewname: str) -> None: ...
|
||||||
def increment_field_skiplock(record: Any, field: Any): ...
|
def escape_psql(to_escape: str) -> str: ...
|
||||||
|
def pg_varchar(size: int = ...) -> str: ...
|
||||||
|
def reverse_order(order: str) -> str: ...
|
||||||
|
def increment_field_skiplock(record: BaseModel, field: str) -> bool: ...
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from typing import Any
|
from typing import Any, Callable
|
||||||
|
|
||||||
_logger: Any
|
from lxml.etree import _Element
|
||||||
|
|
||||||
def add_text_before(node: Any, text: Any) -> None: ...
|
def add_text_before(node: _Element, text: str | None) -> None: ...
|
||||||
def add_text_inside(node: Any, text: Any) -> None: ...
|
def add_text_inside(node: _Element, text: str | None) -> None: ...
|
||||||
def remove_element(node: Any) -> None: ...
|
def remove_element(node: _Element) -> None: ...
|
||||||
def locate_node(arch: Any, spec: Any): ...
|
def locate_node(arch: _Element, spec: _Element) -> _Element: ...
|
||||||
def apply_inheritance_specs(source: Any, specs_tree: Any, inherit_branding: bool = ..., pre_locate: Any = ...): ...
|
def apply_inheritance_specs(source: _Element, specs_tree: _Element, inherit_branding: bool = ...,
|
||||||
|
pre_locate: Callable[[_Element], Any] = ...) -> _Element: ...
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
from typing import Any, Literal
|
||||||
|
|
||||||
from . import config as config
|
from . import config as config
|
||||||
from typing import Any, Optional
|
from ..sql_db import Cursor
|
||||||
|
|
||||||
_logger: Any
|
def try_report(cr: Cursor, uid: int, rname: str, ids, data: Any | None = ..., context: dict | None = ...,
|
||||||
_test_logger: Any
|
our_module: Any | None = ..., report_type: Any | None = ...) -> bool: ...
|
||||||
|
def try_report_action(cr: Cursor, uid: int, action_id: int, active_model: str | None = ..., active_ids: list[int] | None = ...,
|
||||||
def try_report(cr: Any, uid: Any, rname: Any, ids: Any, data: Optional[Any] = ..., context: Optional[Any] = ..., our_module: Optional[Any] = ..., report_type: Optional[Any] = ...): ...
|
wiz_data: dict | None = ..., wiz_buttons: list[str] | None = ..., context: dict | None = ...,
|
||||||
def try_report_action(cr: Any, uid: Any, action_id: Any, active_model: Optional[Any] = ..., active_ids: Optional[Any] = ..., wiz_data: Optional[Any] = ..., wiz_buttons: Optional[Any] = ..., context: Optional[Any] = ..., our_module: Optional[Any] = ...): ...
|
our_module: str | None = ...) -> Literal[True]: ...
|
||||||
|
|||||||
@@ -1,127 +1,142 @@
|
|||||||
import csv
|
import csv
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from typing import Any, Optional
|
from re import Match, Pattern
|
||||||
|
from tarfile import TarFile
|
||||||
|
from types import FrameType
|
||||||
|
from typing import Any, BinaryIO, Callable, Container, IO, Iterable, Iterator, NoReturn
|
||||||
|
|
||||||
|
from lxml.etree import HTMLParser, _Element
|
||||||
|
from polib import POFile
|
||||||
|
|
||||||
|
from .pycompat import _CsvWriter
|
||||||
|
from ..api import Environment
|
||||||
|
from ..models import BaseModel
|
||||||
|
from ..sql_db import Connection, Cursor
|
||||||
|
|
||||||
_logger: Any
|
|
||||||
WEB_TRANSLATION_COMMENT: str
|
WEB_TRANSLATION_COMMENT: str
|
||||||
SKIPPED_ELEMENTS: Any
|
SKIPPED_ELEMENTS: tuple[str, ...]
|
||||||
_LOCALE2WIN32: Any
|
_LOCALE2WIN32: dict[str, str]
|
||||||
ENGLISH_SMALL_WORDS: Any
|
ENGLISH_SMALL_WORDS: set[str]
|
||||||
|
|
||||||
class UNIX_LINE_TERMINATOR(csv.excel):
|
class UNIX_LINE_TERMINATOR(csv.excel):
|
||||||
lineterminator: str = ...
|
lineterminator: str
|
||||||
|
|
||||||
def encode(s: Any): ...
|
def encode(s: str) -> str: ...
|
||||||
|
|
||||||
TRANSLATED_ELEMENTS: Any
|
TRANSLATED_ELEMENTS: set[str]
|
||||||
TRANSLATED_ATTRS: Any
|
TRANSLATED_ATTRS: dict[str, Any]
|
||||||
avoid_pattern: Any
|
avoid_pattern: Pattern
|
||||||
node_pattern: Any
|
node_pattern: Pattern
|
||||||
|
|
||||||
def translate_xml_node(node: Any, callback: Any, parse: Any, serialize: Any): ...
|
def translate_xml_node(node: _Element, callback: Callable[[str], str | None], parse: Callable[[str], _Element],
|
||||||
def parse_xml(text: Any): ...
|
serialize: Callable[[_Element], str]) -> _Element: ...
|
||||||
def serialize_xml(node: Any): ...
|
def parse_xml(text: str) -> _Element: ...
|
||||||
|
def serialize_xml(node: _Element) -> str: ...
|
||||||
|
|
||||||
_HTML_PARSER: Any
|
_HTML_PARSER: HTMLParser
|
||||||
|
|
||||||
def parse_html(text: Any): ...
|
def parse_html(text: str) -> _Element: ...
|
||||||
def serialize_html(node: Any): ...
|
def serialize_html(node: _Element) -> str: ...
|
||||||
def xml_translate(callback: Any, value: Any): ...
|
def xml_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
||||||
def html_translate(callback: Any, value: Any): ...
|
def html_translate(callback: Callable[[str], str | None], value: str) -> str: ...
|
||||||
def translate(cr: Any, name: Any, source_type: Any, lang: Any, source: Optional[Any] = ...): ...
|
def translate(cr: Cursor, name: str, source_type: str, lang: str, source: str | None = ...) -> str: ...
|
||||||
def translate_sql_constraint(cr: Any, key: Any, lang: Any): ...
|
def translate_sql_constraint(cr: Cursor, key: str, lang: str) -> str: ...
|
||||||
|
|
||||||
class GettextAlias:
|
class GettextAlias:
|
||||||
def _get_db(self): ...
|
def _get_db(self) -> Connection | None: ...
|
||||||
def _get_cr(self, frame: Any, allow_create: bool = ...): ...
|
def _get_cr(self, frame: FrameType, allow_create: bool = ...) -> tuple[Cursor, bool]: ...
|
||||||
def _get_uid(self, frame: Any): ...
|
def _get_uid(self, frame: FrameType) -> int: ...
|
||||||
def _get_lang(self, frame: Any): ...
|
def _get_lang(self, frame: FrameType) -> str: ...
|
||||||
def __call__(self, source: Any, *args: Any, **kwargs: Any): ...
|
def __call__(self, source: str, *args, **kwargs) -> str: ...
|
||||||
def _get_translation(self, source: Any): ...
|
def _get_translation(self, source: str) -> str: ...
|
||||||
|
|
||||||
class _lt:
|
class _lt:
|
||||||
__slots__: Any = ...
|
__slots__ = ['_source', '_args']
|
||||||
_source: Any = ...
|
_source: str
|
||||||
_args: Any = ...
|
_args: tuple
|
||||||
def __init__(self, source: Any, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, source: str, *args, **kwargs) -> None: ...
|
||||||
def __str__(self): ...
|
def __str__(self) -> str: ...
|
||||||
def __eq__(self, other: Any) -> Any: ...
|
def __eq__(self, other) -> NoReturn: ...
|
||||||
def __lt__(self, other: Any) -> Any: ...
|
def __lt__(self, other) -> NoReturn: ...
|
||||||
def __add__(self, other: Any): ...
|
def __add__(self, other: str | _lt) -> str: ...
|
||||||
def __radd__(self, other: Any): ...
|
def __radd__(self, other: str) -> str: ...
|
||||||
|
|
||||||
_: Any
|
_: GettextAlias
|
||||||
|
|
||||||
def quote(s: Any): ...
|
def quote(s: str) -> str: ...
|
||||||
|
|
||||||
re_escaped_char: Any
|
re_escaped_char: Pattern
|
||||||
re_escaped_replacements: Any
|
re_escaped_replacements: dict[str, str]
|
||||||
|
|
||||||
def _sub_replacement(match_obj: Any): ...
|
def _sub_replacement(match_obj: Match) -> str: ...
|
||||||
def unquote(str: Any): ...
|
def unquote(str: str) -> str: ...
|
||||||
def TranslationFileReader(source: Any, fileformat: str = ...): ...
|
def TranslationFileReader(source: IO, fileformat: str = ...) -> CSVFileReader | PoFileReader: ...
|
||||||
|
|
||||||
class CSVFileReader:
|
class CSVFileReader:
|
||||||
source: Any = ...
|
source: csv.DictReader
|
||||||
prev_code_src: str = ...
|
prev_code_src: str
|
||||||
def __init__(self, source: Any) -> None: ...
|
def __init__(self, source: IO) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator[csv.DictReader]: ...
|
||||||
|
|
||||||
class PoFileReader:
|
class PoFileReader:
|
||||||
pofile: Any = ...
|
pofile: POFile
|
||||||
def __init__(self, source: Any): ...
|
def __init__(self, source: str | IO): ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterator[dict[str, Any]]: ...
|
||||||
|
|
||||||
def TranslationFileWriter(target: Any, fileformat: str = ..., lang: Optional[Any] = ...): ...
|
def TranslationFileWriter(target, fileformat: str = ..., lang: str | None = ...) -> CSVFileWriter | PoFileWriter | TarFileWriter: ...
|
||||||
|
|
||||||
class CSVFileWriter:
|
class CSVFileWriter:
|
||||||
writer: Any = ...
|
writer: _CsvWriter
|
||||||
def __init__(self, target: Any) -> None: ...
|
def __init__(self, target: BinaryIO) -> None: ...
|
||||||
def write_rows(self, rows: Any) -> None: ...
|
def write_rows(self, rows: Iterable) -> None: ...
|
||||||
|
|
||||||
class PoFileWriter:
|
class PoFileWriter:
|
||||||
buffer: Any = ...
|
buffer: IO
|
||||||
lang: Any = ...
|
lang: str
|
||||||
po: Any = ...
|
po: POFile
|
||||||
def __init__(self, target: Any, lang: Any) -> None: ...
|
def __init__(self, target: IO, lang: str) -> None: ...
|
||||||
def write_rows(self, rows: Any) -> None: ...
|
def write_rows(self, rows: Iterable) -> None: ...
|
||||||
def add_entry(self, modules: Any, tnrs: Any, source: Any, trad: Any, comments: Optional[Any] = ...) -> None: ...
|
def add_entry(self, modules, tnrs, source, trad, comments: Iterable[str] | None = ...) -> None: ...
|
||||||
|
|
||||||
class TarFileWriter:
|
class TarFileWriter:
|
||||||
tar: Any = ...
|
tar: TarFile
|
||||||
lang: Any = ...
|
lang: str
|
||||||
def __init__(self, target: Any, lang: Any) -> None: ...
|
def __init__(self, target: IO, lang: str) -> None: ...
|
||||||
def write_rows(self, rows: Any) -> None: ...
|
def write_rows(self, rows: Iterable) -> None: ...
|
||||||
|
|
||||||
def trans_export(lang: Any, modules: Any, buffer: Any, format: Any, cr: Any) -> None: ...
|
def trans_export(lang: str, modules: list[str], buffer, format: str, cr: Cursor) -> None: ...
|
||||||
def trans_parse_rml(de: Any): ...
|
def trans_parse_rml(de: Iterable) -> list[bytes]: ...
|
||||||
def _push(callback: Any, term: Any, source_line: Any) -> None: ...
|
def _push(callback: Callable[[str, int], Any], term: str, source_line: int) -> None: ...
|
||||||
def in_modules(object_name: Any, modules: Any): ...
|
def in_modules(object_name: str, modules: Container[str]) -> bool: ...
|
||||||
def _extract_translatable_qweb_terms(element: Any, callback: Any) -> None: ...
|
def _extract_translatable_qweb_terms(element: _Element, callback: Callable[[str, int], Any]) -> None: ...
|
||||||
def babel_extract_qweb(fileobj: Any, keywords: Any, comment_tags: Any, options: Any): ...
|
def babel_extract_qweb(fileobj: IO, keywords, comment_tags, options) -> list[tuple]: ...
|
||||||
|
|
||||||
ImdInfo = namedtuple('ExternalId', ['name', 'model', 'res_id', 'module'])
|
ImdInfo = namedtuple('ExternalId', ['name', 'model', 'res_id', 'module'])
|
||||||
|
|
||||||
class TranslationModuleReader:
|
class TranslationModuleReader:
|
||||||
_cr: Any = ...
|
_cr: Cursor
|
||||||
_modules: Any = ...
|
_modules: list[str]
|
||||||
_lang: Any = ...
|
_lang: str | None
|
||||||
env: Any = ...
|
env: Environment
|
||||||
_to_translate: Any = ...
|
_to_translate: list[tuple]
|
||||||
_path_list: Any = ...
|
_path_list: list[tuple[str, Any]]
|
||||||
_installed_modules: Any = ...
|
_installed_modules: list[str]
|
||||||
def __init__(self, cr: Any, modules: Optional[Any] = ..., lang: Optional[Any] = ...) -> None: ...
|
def __init__(self, cr: Cursor, modules: list[str] | None = ..., lang: str | None = ...) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Iterable[tuple]: ...
|
||||||
def _push_translation(self, module: Any, ttype: Any, name: Any, res_id: Any, source: Any, comments: Optional[Any] = ..., record_id: Optional[Any] = ...) -> None: ...
|
def _push_translation(self, module: str, ttype: str, name: str, res_id: str, source: str,
|
||||||
def _get_translatable_records(self, records: Any): ...
|
comments: Iterable[str] | None = ..., record_id: int | None = ...) -> None: ...
|
||||||
|
def _get_translatable_records(self, imd_records: Iterable[ImdInfo]) -> BaseModel: ...
|
||||||
def _export_translatable_records(self) -> None: ...
|
def _export_translatable_records(self) -> None: ...
|
||||||
def _get_module_from_path(self, path: Any): ...
|
def _get_module_from_path(self, path: str) -> str: ...
|
||||||
def _verified_module_filepaths(self, fname: Any, path: Any, root: Any): ...
|
def _verified_module_filepaths(self, fname: str, path: str, root: str) -> tuple[str | None, str | None, str | None, str | None]: ...
|
||||||
def _babel_extract_terms(self, fname: Any, path: Any, root: Any, extract_method: str = ..., trans_type: str = ..., extra_comments: Optional[Any] = ..., extract_keywords: Any = ...) -> None: ...
|
def _babel_extract_terms(self, fname: str, path: str, root: str, extract_method: str = ..., trans_type: str = ...,
|
||||||
|
extra_comments: list[str] | None = ..., extract_keywords: dict = ...) -> None: ...
|
||||||
def _export_translatable_resources(self) -> None: ...
|
def _export_translatable_resources(self) -> None: ...
|
||||||
|
|
||||||
def trans_load(cr: Any, filename: Any, lang: Any, verbose: bool = ..., create_empty_translation: bool = ..., overwrite: bool = ...): ...
|
def trans_load(cr: Cursor, filename: str, lang: str, verbose: bool = ..., create_empty_translation: bool = ...,
|
||||||
def trans_load_data(cr: Any, fileobj: Any, fileformat: Any, lang: Any, verbose: bool = ..., create_empty_translation: bool = ..., overwrite: bool = ...) -> None: ...
|
overwrite: bool = ...) -> None: ...
|
||||||
def get_locales(lang: Optional[Any] = ...) -> None: ...
|
def trans_load_data(cr: Cursor, fileobj: IO, fileformat: str, lang: str, verbose: bool = ...,
|
||||||
def resetlocale(): ...
|
create_empty_translation: bool = ..., overwrite: bool = ...) -> None: ...
|
||||||
def load_language(cr: Any, lang: Any) -> None: ...
|
def get_locales(lang: str | None = ...) -> None: ...
|
||||||
|
def resetlocale() -> str: ...
|
||||||
|
def load_language(cr: Cursor, lang: str) -> None: ...
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
from typing import Any
|
from ast import expr as _expr
|
||||||
|
from collections import defaultdict
|
||||||
|
from re import Pattern
|
||||||
|
from typing import Callable, TypeVar
|
||||||
|
|
||||||
_logger: Any
|
from lxml.etree import RelaxNG, _Element
|
||||||
_validators: Any
|
|
||||||
_relaxng_cache: Any
|
|
||||||
READONLY: Any
|
|
||||||
|
|
||||||
def _get_attrs_symbols(): ...
|
_CallableT = TypeVar('_CallableT', bound=Callable)
|
||||||
def get_variable_names(expr: Any): ...
|
|
||||||
def get_dict_asts(expr: Any): ...
|
_validators: defaultdict[str, list[Callable]]
|
||||||
def _check(condition: Any, explanation: Any) -> None: ...
|
_relaxng_cache: dict[str, RelaxNG | None]
|
||||||
def get_domain_identifiers(expr: Any): ...
|
READONLY: Pattern
|
||||||
def valid_view(arch: Any, **kwargs: Any): ...
|
|
||||||
def validate(*view_types: Any): ...
|
def _get_attrs_symbols() -> set[str]: ...
|
||||||
def relaxng(view_type: Any): ...
|
def get_variable_names(expr: str | _expr) -> set[str]: ...
|
||||||
def schema_valid(arch: Any, **kwargs: Any): ...
|
def get_dict_asts(expr: str | _expr) -> dict: ...
|
||||||
|
def _check(condition: bool, explanation: str) -> None: ...
|
||||||
|
def get_domain_identifiers(expr: str | _expr) -> tuple[set[str], set[str]]: ...
|
||||||
|
def valid_view(arch: _Element, **kwargs) -> bool: ...
|
||||||
|
def validate(*view_types: str) -> Callable[[_CallableT], _CallableT]: ...
|
||||||
|
def relaxng(view_type: str) -> RelaxNG: ...
|
||||||
|
def schema_valid(arch: _Element, **kwargs) -> bool: ...
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
from os import R_OK as R_OK, W_OK as W_OK
|
from os import R_OK as R_OK, W_OK as W_OK
|
||||||
from os.path import dirname as dirname
|
from os.path import dirname as dirname
|
||||||
from typing import Any, Optional
|
from typing import Iterator
|
||||||
|
|
||||||
__docformat__: str
|
__docformat__: str
|
||||||
__all__: Any
|
|
||||||
ENOENT: int
|
ENOENT: int
|
||||||
windows: Any
|
windows: bool
|
||||||
seen: Any
|
seen: set
|
||||||
defpathext: Any
|
defpathext: list[str]
|
||||||
|
|
||||||
def which_files(file: Any, mode: Any = ..., path: Optional[Any] = ..., pathext: Optional[Any] = ...) -> None: ...
|
def which_files(file: str, mode: int = ..., path: str | None = ..., pathext: str | None = ...) -> Iterator[str]: ...
|
||||||
def which(file: Any, mode: Any = ..., path: Optional[Any] = ..., pathext: Optional[Any] = ...): ...
|
def which(file: str, mode: int = ..., path: str | None = ..., pathext: str | None = ...) -> str: ...
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
from typing import Any
|
def nl_langinfo(param) -> str: ...
|
||||||
|
|
||||||
def nl_langinfo(param: Any): ...
|
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
from lxml import etree
|
from lxml import etree
|
||||||
from typing import Any, Optional
|
from lxml.etree import _Element
|
||||||
|
from typing import IO, Iterable
|
||||||
|
|
||||||
|
from ..api import Environment
|
||||||
|
|
||||||
class odoo_resolver(etree.Resolver):
|
class odoo_resolver(etree.Resolver):
|
||||||
env: Any = ...
|
env: Environment
|
||||||
def __init__(self, env: Any) -> None: ...
|
def __init__(self, env: Environment) -> None: ...
|
||||||
def resolve(self, url: Any, id: Any, context: Any): ...
|
def resolve(self, url: str, id: str, context) -> str: ...
|
||||||
|
|
||||||
def _check_with_xsd(tree_or_str: Any, stream: Any, env: Optional[Any] = ...) -> None: ...
|
def _check_with_xsd(tree_or_str: str | _Element, stream: str | IO, env: Environment | None = ...) -> None: ...
|
||||||
def create_xml_node_chain(first_parent_node: Any, nodes_list: Any, last_node_value: Optional[Any] = ...): ...
|
def create_xml_node_chain(first_parent_node: _Element, nodes_list: Iterable[str], last_node_value: str | None = ...) -> list[_Element]: ...
|
||||||
def create_xml_node(parent_node: Any, node_name: Any, node_value: Optional[Any] = ...): ...
|
def create_xml_node(parent_node: _Element, node_name: str, node_value: str | None = ...) -> _Element: ...
|
||||||
|
def cleanup_xml_node(xml_node_or_string: _Element | str, remove_blank_text: bool = ..., remove_blank_nodes: bool = ...,
|
||||||
|
indent_level: int = ..., indent_space: str = ...) -> _Element: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user