mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
Update stubs
This commit is contained in:
1
odoo-stubs/addons/__init__.pyi
Normal file
1
odoo-stubs/addons/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
odoo-stubs/cli/__init__.pyi
Normal file
2
odoo-stubs/cli/__init__.pyi
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import deploy as deploy, scaffold as scaffold, server as server, shell as shell, start as start
|
||||
from .command import Command as Command, main as main
|
||||
14
odoo-stubs/cli/command.pyi
Normal file
14
odoo-stubs/cli/command.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from odoo.modules import get_module_path as get_module_path, get_modules as get_modules
|
||||
from typing import Any
|
||||
|
||||
commands: Any
|
||||
|
||||
class CommandType(type):
|
||||
def __init__(cls, name: Any, bases: Any, attrs: Any) -> None: ...
|
||||
|
||||
Command: Any
|
||||
|
||||
class Help(Command):
|
||||
def run(self, args: Any) -> None: ...
|
||||
|
||||
def main() -> None: ...
|
||||
10
odoo-stubs/cli/deploy.pyi
Normal file
10
odoo-stubs/cli/deploy.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from . import Command as Command
|
||||
from typing import Any
|
||||
|
||||
class Deploy(Command):
|
||||
session: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def deploy_module(self, module_path: Any, url: Any, login: Any, password: Any, db: str = ..., force: bool = ...): ...
|
||||
def login_upload_module(self, module_file: Any, url: Any, login: Any, password: Any, db: Any, force: bool = ...): ...
|
||||
def zip_module(self, path: Any): ...
|
||||
def run(self, cmdargs: Any) -> None: ...
|
||||
25
odoo-stubs/cli/scaffold.pyi
Normal file
25
odoo-stubs/cli/scaffold.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from . import Command as Command
|
||||
from typing import Any, Optional
|
||||
|
||||
class Scaffold(Command):
|
||||
def run(self, cmdargs: Any) -> None: ...
|
||||
def epilog(self): ...
|
||||
|
||||
builtins: Any
|
||||
|
||||
def snake(s: Any): ...
|
||||
def pascal(s: Any): ...
|
||||
def directory(p: Any, create: bool = ...): ...
|
||||
|
||||
env: Any
|
||||
|
||||
class template:
|
||||
id: Any = ...
|
||||
path: Any = ...
|
||||
def __init__(self, identifier: Any) -> None: ...
|
||||
def __str__(self): ...
|
||||
def files(self) -> None: ...
|
||||
def render_to(self, modname: Any, directory: Any, params: Optional[Any] = ...) -> None: ...
|
||||
|
||||
def die(message: Any, code: int = ...) -> None: ...
|
||||
def warn(message: Any) -> None: ...
|
||||
18
odoo-stubs/cli/server.pyi
Normal file
18
odoo-stubs/cli/server.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from . import Command as Command
|
||||
from typing import Any
|
||||
|
||||
__author__: Any
|
||||
__version__: Any
|
||||
_logger: Any
|
||||
|
||||
def check_root_user() -> None: ...
|
||||
def check_postgres_user() -> None: ...
|
||||
def report_configuration() -> None: ...
|
||||
def rm_pid_file(main_pid: Any) -> None: ...
|
||||
def setup_pid_file() -> None: ...
|
||||
def export_translation() -> None: ...
|
||||
def import_translation() -> None: ...
|
||||
def main(args: Any) -> None: ...
|
||||
|
||||
class Server(Command):
|
||||
def run(self, args: Any) -> None: ...
|
||||
22
odoo-stubs/cli/shell.pyi
Normal file
22
odoo-stubs/cli/shell.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
import code
|
||||
from . import Command as Command
|
||||
from odoo.tools import config as config
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
def raise_keyboard_interrupt(*a: Any) -> None: ...
|
||||
|
||||
class Console(code.InteractiveConsole):
|
||||
def __init__(self, locals: Optional[Any] = ..., filename: str = ...) -> None: ...
|
||||
|
||||
class Shell(Command):
|
||||
supported_shells: Any = ...
|
||||
def init(self, args: Any) -> None: ...
|
||||
def console(self, local_vars: Any): ...
|
||||
def ipython(self, local_vars: Any) -> None: ...
|
||||
def ptpython(self, local_vars: Any) -> None: ...
|
||||
def bpython(self, local_vars: Any) -> None: ...
|
||||
def python(self, local_vars: Any) -> None: ...
|
||||
def shell(self, dbname: Any) -> None: ...
|
||||
def run(self, args: Any): ...
|
||||
11
odoo-stubs/cli/start.pyi
Normal file
11
odoo-stubs/cli/start.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from . import Command as Command
|
||||
from .server import main as main
|
||||
from odoo.modules.module import MANIFEST_NAMES as MANIFEST_NAMES, get_module_root as get_module_root
|
||||
from odoo.service.db import DatabaseExists as DatabaseExists, _create_empty_database as _create_empty_database
|
||||
from typing import Any
|
||||
|
||||
class Start(Command):
|
||||
def get_module_list(self, path: Any): ...
|
||||
def run(self, cmdargs: Any): ...
|
||||
|
||||
def die(message: Any, code: int = ...) -> None: ...
|
||||
4
odoo-stubs/conf/__init__.pyi
Normal file
4
odoo-stubs/conf/__init__.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from typing import Any
|
||||
|
||||
addons_paths: Any
|
||||
server_wide_modules: Any
|
||||
@@ -1,3 +1,4 @@
|
||||
from .tools.func import frame_codeinfo as frame_codeinfo
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
3
odoo-stubs/modules/__init__.pyi
Normal file
3
odoo-stubs/modules/__init__.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
from . import db as db, graph as graph, loading as loading, migration as migration, module as module, registry as registry
|
||||
from odoo.modules.loading import load_modules as load_modules, reset_modules_state as reset_modules_state
|
||||
from odoo.modules.module import adapt_version as adapt_version, get_module_path as get_module_path, get_module_resource as get_module_resource, get_modules as get_modules, get_modules_with_version as get_modules_with_version, get_resource_from_path as get_resource_from_path, get_resource_path as get_resource_path, initialize_sys_path as initialize_sys_path, load_information_from_description_file as load_information_from_description_file, load_openerp_module as load_openerp_module
|
||||
8
odoo-stubs/modules/db.pyi
Normal file
8
odoo-stubs/modules/db.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
|
||||
def is_initialized(cr: Any): ...
|
||||
def initialize(cr: Any) -> None: ...
|
||||
def create_categories(cr: Any, categories: Any): ...
|
||||
def has_unaccent(cr: Any): ...
|
||||
30
odoo-stubs/modules/graph.pyi
Normal file
30
odoo-stubs/modules/graph.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
class Graph(dict):
|
||||
def add_node(self, name: Any, info: Any): ...
|
||||
def update_from_db(self, cr: Any) -> None: ...
|
||||
def add_module(self, cr: Any, module: Any, force: Optional[Any] = ...) -> None: ...
|
||||
def add_modules(self, cr: Any, module_list: Any, force: Optional[Any] = ...): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __str__(self): ...
|
||||
|
||||
class Node:
|
||||
def __new__(cls, name: Any, graph: Any, info: Any): ...
|
||||
name: Any = ...
|
||||
graph: Any = ...
|
||||
info: Any = ...
|
||||
children: Any = ...
|
||||
depth: int = ...
|
||||
def __init__(self, name: Any, graph: Any, info: Any) -> None: ...
|
||||
@property
|
||||
def data(self): ...
|
||||
def add_child(self, name: Any, info: Any): ...
|
||||
def __setattr__(self, name: Any, value: Any) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __str__(self): ...
|
||||
def _pprint(self, depth: int = ...): ...
|
||||
def should_have_demo(self): ...
|
||||
@property
|
||||
def parents(self): ...
|
||||
15
odoo-stubs/modules/loading.pyi
Normal file
15
odoo-stubs/modules/loading.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import SUPERUSER_ID as SUPERUSER_ID, api as api
|
||||
from odoo.modules.module import adapt_version as adapt_version, initialize_sys_path as initialize_sys_path, load_openerp_module as load_openerp_module
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
_test_logger: Any
|
||||
|
||||
def load_data(cr: Any, idref: Any, mode: Any, kind: Any, package: Any, report: Any): ...
|
||||
def load_demo(cr: Any, package: Any, idref: Any, mode: Any, report: Optional[Any] = ...): ...
|
||||
def force_demo(cr: Any) -> None: ...
|
||||
def load_module_graph(cr: Any, graph: Any, status: Optional[Any] = ..., perform_checks: bool = ..., skip_modules: Optional[Any] = ..., report: Optional[Any] = ..., models_to_check: Optional[Any] = ...): ...
|
||||
def _check_module_names(cr: Any, module_names: Any) -> None: ...
|
||||
def load_marked_modules(cr: Any, graph: Any, states: Any, force: Any, progressdict: Any, report: Any, loaded_modules: Any, perform_checks: Any, models_to_check: Optional[Any] = ...): ...
|
||||
def load_modules(db: Any, force_demo: bool = ..., status: Optional[Any] = ..., update_module: bool = ...): ...
|
||||
def reset_modules_state(db_name: Any) -> None: ...
|
||||
16
odoo-stubs/modules/migration.pyi
Normal file
16
odoo-stubs/modules/migration.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from odoo.modules.module import get_resource_path as get_resource_path
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from odoo.tools.parse_version import parse_version as parse_version
|
||||
from typing import Any
|
||||
|
||||
def load_script(path: Any, module_name: Any): ...
|
||||
|
||||
_logger: Any
|
||||
|
||||
class MigrationManager:
|
||||
cr: Any = ...
|
||||
graph: Any = ...
|
||||
migrations: Any = ...
|
||||
def __init__(self, cr: Any, graph: Any) -> None: ...
|
||||
def _get_files(self): ...
|
||||
def migrate_module(self, pkg: Any, stage: Any): ...
|
||||
49
odoo-stubs/modules/module.pyi
Normal file
49
odoo-stubs/modules/module.pyi
Normal file
@@ -0,0 +1,49 @@
|
||||
from odoo import SUPERUSER_ID as SUPERUSER_ID, api as api
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from operator import itemgetter as itemgetter
|
||||
from typing import Any, Optional
|
||||
|
||||
MANIFEST_NAMES: Any
|
||||
README: Any
|
||||
_logger: Any
|
||||
ad_paths: Any
|
||||
hooked: bool
|
||||
loaded: Any
|
||||
|
||||
class AddonsHook:
|
||||
def find_module(self, name: Any, path: Optional[Any] = ...): ...
|
||||
def load_module(self, name: Any): ...
|
||||
|
||||
class OdooHook:
|
||||
def find_module(self, name: Any, path: Optional[Any] = ...): ...
|
||||
def load_module(self, name: Any): ...
|
||||
|
||||
def initialize_sys_path() -> None: ...
|
||||
def get_module_path(module: Any, downloaded: bool = ..., display_warning: bool = ...): ...
|
||||
def get_module_filetree(module: Any, dir: str = ...): ...
|
||||
def get_resource_path(module: Any, *args: Any): ...
|
||||
get_module_resource = get_resource_path
|
||||
|
||||
def get_resource_from_path(path: Any): ...
|
||||
def get_module_icon(module: Any): ...
|
||||
def module_manifest(path: Any): ...
|
||||
def get_module_root(path: Any): ...
|
||||
def load_information_from_description_file(module: Any, mod_path: Optional[Any] = ...): ...
|
||||
def load_openerp_module(module_name: Any) -> None: ...
|
||||
def get_modules(): ...
|
||||
def get_modules_with_version(): ...
|
||||
def adapt_version(version: Any): ...
|
||||
def get_test_modules(module: Any): ...
|
||||
def _get_tests_modules(path: Any, module: Any): ...
|
||||
|
||||
class TestStream:
|
||||
logger: Any = ...
|
||||
r: Any = ...
|
||||
def __init__(self, logger_name: str = ...) -> None: ...
|
||||
def flush(self) -> None: ...
|
||||
def write(self, s: Any) -> None: ...
|
||||
|
||||
current_test: Any
|
||||
|
||||
def run_unit_tests(module_name: Any, dbname: Any, position: str = ...): ...
|
||||
def unwrap_suite(test: Any) -> None: ...
|
||||
73
odoo-stubs/modules/registry.pyi
Normal file
73
odoo-stubs/modules/registry.pyi
Normal file
@@ -0,0 +1,73 @@
|
||||
from .. import SUPERUSER_ID as SUPERUSER_ID
|
||||
from collections import Mapping, defaultdict as defaultdict
|
||||
from odoo.sql_db import TestCursor as TestCursor
|
||||
from odoo.tools import OrderedSet as OrderedSet, assertion_report as assertion_report, config as config, existing_tables as existing_tables, lazy_classproperty as lazy_classproperty, lazy_property as lazy_property, table_exists as table_exists, topological_sort as topological_sort
|
||||
from odoo.tools.lru import LRU as LRU
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
class Registry(Mapping):
|
||||
_lock: Any = ...
|
||||
_saved_lock: Any = ...
|
||||
model_cache: Any = ...
|
||||
def registries(cls): ...
|
||||
def __new__(cls, db_name: Any): ...
|
||||
@classmethod
|
||||
def new(cls, db_name: Any, force_demo: bool = ..., status: Optional[Any] = ..., update_module: bool = ...): ...
|
||||
models: Any = ...
|
||||
_sql_error: Any = ...
|
||||
_init: bool = ...
|
||||
_assertion_report: Any = ...
|
||||
_fields_by_model: Any = ...
|
||||
_post_init_queue: Any = ...
|
||||
_init_modules: Any = ...
|
||||
updated_modules: Any = ...
|
||||
loaded_xmlids: Any = ...
|
||||
db_name: Any = ...
|
||||
_db: Any = ...
|
||||
test_cr: Any = ...
|
||||
test_lock: Any = ...
|
||||
loaded: bool = ...
|
||||
ready: bool = ...
|
||||
registry_sequence: Any = ...
|
||||
cache_sequence: Any = ...
|
||||
registry_invalidated: bool = ...
|
||||
cache_invalidated: bool = ...
|
||||
has_unaccent: Any = ...
|
||||
def init(self, db_name: Any) -> None: ...
|
||||
@classmethod
|
||||
def delete(cls, db_name: Any) -> None: ...
|
||||
@classmethod
|
||||
def delete_all(cls) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __getitem__(self, model_name: Any): ...
|
||||
def __call__(self, model_name: Any): ...
|
||||
def __setitem__(self, model_name: Any, model: Any) -> None: ...
|
||||
def field_sequence(self): ...
|
||||
def descendants(self, model_names: Any, *kinds: Any): ...
|
||||
def load(self, cr: Any, module: Any): ...
|
||||
_m2m: Any = ...
|
||||
def setup_models(self, cr: Any) -> None: ...
|
||||
def post_init(self, func: Any, *args: Any, **kwargs: Any) -> None: ...
|
||||
def init_models(self, cr: Any, model_names: Any, context: Any) -> None: ...
|
||||
def check_tables_exist(self, cr: Any) -> None: ...
|
||||
def cache(self): ...
|
||||
def _clear_cache(self) -> None: ...
|
||||
def clear_caches(self) -> None: ...
|
||||
def setup_signaling(self) -> None: ...
|
||||
def check_signaling(self): ...
|
||||
def signal_changes(self) -> None: ...
|
||||
def reset_changes(self) -> None: ...
|
||||
def manage_changes(self) -> None: ...
|
||||
def in_test_mode(self): ...
|
||||
def enter_test_mode(self, cr: Any) -> None: ...
|
||||
def leave_test_mode(self) -> None: ...
|
||||
def cursor(self): ...
|
||||
|
||||
class DummyRLock:
|
||||
def acquire(self) -> None: ...
|
||||
def release(self) -> None: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
@@ -1,4 +1,5 @@
|
||||
import logging.handlers
|
||||
from . import release as release, sql_db as sql_db, tools as tools
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
1
odoo-stubs/osv/__init__.pyi
Normal file
1
odoo-stubs/osv/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from . import osv as osv
|
||||
68
odoo-stubs/osv/expression.pyi
Normal file
68
odoo-stubs/osv/expression.pyi
Normal file
@@ -0,0 +1,68 @@
|
||||
from ..models import BaseModel as BaseModel, MAGIC_COLUMNS as MAGIC_COLUMNS
|
||||
from functools import partial as partial
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
NOT_OPERATOR: str
|
||||
OR_OPERATOR: str
|
||||
AND_OPERATOR: str
|
||||
DOMAIN_OPERATORS: Any
|
||||
TERM_OPERATORS: Any
|
||||
NEGATIVE_TERM_OPERATORS: Any
|
||||
DOMAIN_OPERATORS_NEGATION: Any
|
||||
TERM_OPERATORS_NEGATION: Any
|
||||
TRUE_LEAF: Any
|
||||
FALSE_LEAF: Any
|
||||
TRUE_DOMAIN: Any
|
||||
FALSE_DOMAIN: Any
|
||||
_logger: Any
|
||||
|
||||
def normalize_domain(domain: Any): ...
|
||||
def is_false(model: Any, domain: Any): ...
|
||||
def combine(operator: Any, unit: Any, zero: Any, domains: Any): ...
|
||||
def AND(domains: Any): ...
|
||||
def OR(domains: Any): ...
|
||||
def distribute_not(domain: Any): ...
|
||||
def _quote(to_quote: Any): ...
|
||||
def generate_table_alias(src_table_alias: Any, joined_tables: Any = ...): ...
|
||||
def get_alias_from_query(from_query: Any): ...
|
||||
def normalize_leaf(element: Any): ...
|
||||
def is_operator(element: Any): ...
|
||||
def is_leaf(element: Any, internal: bool = ...): ...
|
||||
def select_from_where(cr: Any, select_field: Any, from_table: Any, where_field: Any, where_ids: Any, where_operator: Any): ...
|
||||
def select_distinct_from_where_not_null(cr: Any, select_field: Any, from_table: Any): ...
|
||||
def get_unaccent_wrapper(cr: Any): ...
|
||||
|
||||
class ExtendedLeaf:
|
||||
join_context: Any = ...
|
||||
leaf: Any = ...
|
||||
model: Any = ...
|
||||
_models: Any = ...
|
||||
def __init__(self, leaf: Any, model: Any, join_context: Optional[Any] = ..., internal: bool = ...) -> None: ...
|
||||
def __str__(self): ...
|
||||
def generate_alias(self): ...
|
||||
def add_join_context(self, model: Any, lhs_col: Any, table_col: Any, link: Any) -> None: ...
|
||||
def get_join_conditions(self): ...
|
||||
def get_tables(self): ...
|
||||
def _get_context_debug(self): ...
|
||||
def check_leaf(self, internal: bool = ...) -> None: ...
|
||||
def is_operator(self): ...
|
||||
def is_true_leaf(self): ...
|
||||
def is_false_leaf(self): ...
|
||||
def is_leaf(self, internal: bool = ...): ...
|
||||
def normalize_leaf(self): ...
|
||||
|
||||
def create_substitution_leaf(leaf: Any, new_elements: Any, new_model: Optional[Any] = ..., internal: bool = ...): ...
|
||||
|
||||
class expression:
|
||||
_unaccent: Any = ...
|
||||
joins: Any = ...
|
||||
root_model: Any = ...
|
||||
expression: Any = ...
|
||||
def __init__(self, domain: Any, model: Any) -> None: ...
|
||||
def get_tables(self): ...
|
||||
result: Any = ...
|
||||
stack: Any = ...
|
||||
def parse(self): ...
|
||||
def __leaf_to_sql(self, eleaf: Any): ...
|
||||
def to_sql(self): ...
|
||||
25
odoo-stubs/osv/orm.pyi
Normal file
25
odoo-stubs/osv/orm.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from ..exceptions import except_orm as except_orm
|
||||
from ..models import AbstractModel as AbstractModel, BaseModel as BaseModel, LOG_ACCESS_COLUMNS as LOG_ACCESS_COLUMNS, MAGIC_COLUMNS as MAGIC_COLUMNS, MetaModel as MetaModel, Model as Model, TransientModel as TransientModel
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from odoo.tools.safe_eval import safe_eval as safe_eval
|
||||
from typing import Any, Optional
|
||||
|
||||
browse_record_list = BaseModel
|
||||
|
||||
class BRM(type):
|
||||
def __instancecheck__(self, inst: Any): ...
|
||||
|
||||
browse_record: Any
|
||||
|
||||
class NBM(type):
|
||||
def __instancecheck__(self, inst: Any): ...
|
||||
|
||||
browse_null: Any
|
||||
|
||||
def transfer_field_to_modifiers(field: Any, modifiers: Any) -> None: ...
|
||||
def transfer_node_to_modifiers(node: Any, modifiers: Any, context: Optional[Any] = ..., in_tree_view: bool = ...) -> None: ...
|
||||
def simplify_modifiers(modifiers: Any) -> None: ...
|
||||
def transfer_modifiers_to_node(modifiers: Any, node: Any) -> None: ...
|
||||
def setup_modifiers(node: Any, field: Optional[Any] = ..., context: Optional[Any] = ..., in_tree_view: bool = ...) -> None: ...
|
||||
def test_modifiers(what: Any, expected: Any) -> None: ...
|
||||
def modifiers_tests() -> None: ...
|
||||
7
odoo-stubs/osv/osv.pyi
Normal file
7
odoo-stubs/osv/osv.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from ..exceptions import except_orm as except_orm
|
||||
from .orm import AbstractModel as AbstractModel, Model as Model, TransientModel as TransientModel
|
||||
|
||||
except_osv = except_orm
|
||||
osv = Model
|
||||
osv_memory = TransientModel
|
||||
osv_abstract = AbstractModel
|
||||
16
odoo-stubs/osv/query.pyi
Normal file
16
odoo-stubs/osv/query.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
def _quote(to_quote: Any): ...
|
||||
|
||||
class Query:
|
||||
tables: Any = ...
|
||||
where_clause: Any = ...
|
||||
where_clause_params: Any = ...
|
||||
joins: Any = ...
|
||||
extras: Any = ...
|
||||
def __init__(self, tables: Optional[Any] = ..., where_clause: Optional[Any] = ..., where_clause_params: Optional[Any] = ..., joins: Optional[Any] = ..., extras: Optional[Any] = ...) -> None: ...
|
||||
def _get_table_aliases(self): ...
|
||||
def _get_alias_mapping(self): ...
|
||||
def add_join(self, connection: Any, implicit: bool = ..., outer: bool = ..., extra: Optional[Any] = ..., extra_params: Any = ...): ...
|
||||
def get_sql(self): ...
|
||||
def __str__(self): ...
|
||||
1
odoo-stubs/service/__init__.pyi
Normal file
1
odoo-stubs/service/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from . import common as common, db as db, model as model, server as server, wsgi_server as wsgi_server
|
||||
14
odoo-stubs/service/common.pyi
Normal file
14
odoo-stubs/service/common.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from . import security as security
|
||||
from odoo.exceptions import AccessDenied as AccessDenied
|
||||
from odoo.tools.translate import _ as _
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
RPC_VERSION_1: Any
|
||||
|
||||
def exp_login(db: Any, login: Any, password: Any): ...
|
||||
def exp_authenticate(db: Any, login: Any, password: Any, user_agent_env: Any): ...
|
||||
def exp_version(): ...
|
||||
def exp_about(extended: bool = ...): ...
|
||||
def exp_set_loglevel(loglevel: Any, logger: Optional[Any] = ...): ...
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
36
odoo-stubs/service/db.pyi
Normal file
36
odoo-stubs/service/db.pyi
Normal file
@@ -0,0 +1,36 @@
|
||||
from functools import wraps as wraps
|
||||
from odoo import SUPERUSER_ID as SUPERUSER_ID
|
||||
from odoo.exceptions import AccessDenied as AccessDenied
|
||||
from odoo.release import version_info as version_info
|
||||
from odoo.sql_db import db_connect as db_connect
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
class DatabaseExists(Warning): ...
|
||||
|
||||
def check_db_management_enabled(method: Any): ...
|
||||
def check_super(passwd: Any): ...
|
||||
def _initialize_db(id: Any, db_name: Any, demo: Any, lang: Any, user_password: Any, login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...) -> None: ...
|
||||
def _create_empty_database(name: Any) -> None: ...
|
||||
def exp_create_database(db_name: Any, demo: Any, lang: Any, user_password: str = ..., login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...): ...
|
||||
def exp_duplicate_database(db_original_name: Any, db_name: Any): ...
|
||||
def _drop_conn(cr: Any, db_name: Any) -> None: ...
|
||||
def exp_drop(db_name: Any): ...
|
||||
def exp_dump(db_name: Any, format: Any): ...
|
||||
def dump_db_manifest(cr: Any): ...
|
||||
def dump_db(db_name: Any, stream: Any, backup_format: str = ...): ...
|
||||
def exp_restore(db_name: Any, data: Any, copy: bool = ...): ...
|
||||
def restore_db(db: Any, dump_file: Any, copy: bool = ...) -> None: ...
|
||||
def exp_rename(old_name: Any, new_name: Any): ...
|
||||
def exp_change_admin_password(new_password: Any): ...
|
||||
def exp_migrate_databases(databases: Any): ...
|
||||
def exp_db_exist(db_name: Any): ...
|
||||
def list_dbs(force: bool = ...): ...
|
||||
def list_db_incompatible(databases: Any): ...
|
||||
def exp_list(document: bool = ...): ...
|
||||
def exp_list_lang(): ...
|
||||
def exp_list_countries(): ...
|
||||
def exp_server_version(): ...
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
16
odoo-stubs/service/model.pyi
Normal file
16
odoo-stubs/service/model.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from . import security as security
|
||||
from ..tools import lazy as lazy, traverse_containers as traverse_containers
|
||||
from odoo.exceptions import QWebException as QWebException, UserError as UserError, ValidationError as ValidationError
|
||||
from odoo.models import check_method_name as check_method_name
|
||||
from odoo.tools.translate import _ as _, translate as translate
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
PG_CONCURRENCY_ERRORS_TO_RETRY: Any
|
||||
MAX_TRIES_ON_CONCURRENCY_FAILURE: int
|
||||
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
def check(f: Any): ...
|
||||
def execute_cr(cr: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ...
|
||||
def execute_kw(db: Any, uid: Any, obj: Any, method: Any, args: Any, kw: Optional[Any] = ...): ...
|
||||
def execute(db: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ...
|
||||
6
odoo-stubs/service/security.pyi
Normal file
6
odoo-stubs/service/security.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
def login(db: Any, login: Any, password: Any): ...
|
||||
def check(db: Any, uid: Any, passwd: Any): ...
|
||||
def compute_session_token(session: Any, env: Any): ...
|
||||
def check_session(session: Any, env: Any): ...
|
||||
177
odoo-stubs/service/server.pyi
Normal file
177
odoo-stubs/service/server.pyi
Normal file
@@ -0,0 +1,177 @@
|
||||
import werkzeug.serving
|
||||
from odoo.modules import get_modules as get_modules
|
||||
from odoo.modules.module import get_test_modules as get_test_modules, run_unit_tests as run_unit_tests
|
||||
from odoo.modules.registry import Registry as Registry
|
||||
from odoo.release import nt_service_name as nt_service_name
|
||||
from odoo.tools import config as config, dumpstacks as dumpstacks, log_ormcache_stats as log_ormcache_stats, stripped_sys_argv as stripped_sys_argv
|
||||
from typing import Any, Optional
|
||||
|
||||
INOTIFY_LISTEN_EVENTS: Any
|
||||
_logger: Any
|
||||
SLEEP_INTERVAL: int
|
||||
|
||||
def memory_info(process: Any): ...
|
||||
def set_limit_memory_hard() -> None: ...
|
||||
def empty_pipe(fd: Any) -> None: ...
|
||||
|
||||
class LoggingBaseWSGIServerMixIn:
|
||||
def handle_error(self, request: Any, client_address: Any) -> None: ...
|
||||
|
||||
class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGIServer):
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def server_activate(self) -> None: ...
|
||||
|
||||
class RequestHandler(werkzeug.serving.WSGIRequestHandler):
|
||||
timeout: int = ...
|
||||
def setup(self) -> None: ...
|
||||
|
||||
class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer):
|
||||
max_http_threads: Any = ...
|
||||
http_threads_sem: Any = ...
|
||||
daemon_threads: bool = ...
|
||||
def __init__(self, host: Any, port: Any, app: Any) -> None: ...
|
||||
reload_socket: bool = ...
|
||||
socket: Any = ...
|
||||
def server_bind(self) -> None: ...
|
||||
def server_activate(self) -> None: ...
|
||||
def process_request(self, request: Any, client_address: Any) -> None: ...
|
||||
def _handle_request_noblock(self) -> None: ...
|
||||
def shutdown_request(self, request: Any) -> None: ...
|
||||
|
||||
class FSWatcherBase:
|
||||
def handle_file(self, path: Any): ...
|
||||
|
||||
class FSWatcherWatchdog(FSWatcherBase):
|
||||
observer: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def dispatch(self, event: Any) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
|
||||
class FSWatcherInotify(FSWatcherBase):
|
||||
started: bool = ...
|
||||
watcher: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
thread: Any = ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
|
||||
class CommonServer:
|
||||
app: Any = ...
|
||||
interface: Any = ...
|
||||
port: Any = ...
|
||||
pid: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def close_socket(self, sock: Any) -> None: ...
|
||||
|
||||
class ThreadedServer(CommonServer):
|
||||
main_thread_id: Any = ...
|
||||
quit_signals_received: int = ...
|
||||
httpd: Any = ...
|
||||
limits_reached_threads: Any = ...
|
||||
limit_reached_time: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def process_limit(self) -> None: ...
|
||||
def cron_thread(self, number: Any) -> None: ...
|
||||
def cron_spawn(self) -> None: ...
|
||||
def http_thread(self): ...
|
||||
def http_spawn(self) -> None: ...
|
||||
def start(self, stop: bool = ...): ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self, preload: Optional[Any] = ..., stop: bool = ...): ...
|
||||
def reload(self) -> None: ...
|
||||
|
||||
class GeventServer(CommonServer):
|
||||
port: Any = ...
|
||||
httpd: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def process_limits(self) -> None: ...
|
||||
ppid: Any = ...
|
||||
def watchdog(self, beat: int = ...) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self, preload: Any, stop: Any) -> None: ...
|
||||
|
||||
class PreforkServer(CommonServer):
|
||||
address: Any = ...
|
||||
population: Any = ...
|
||||
timeout: Any = ...
|
||||
limit_request: Any = ...
|
||||
cron_timeout: Any = ...
|
||||
beat: int = ...
|
||||
app: Any = ...
|
||||
pid: Any = ...
|
||||
socket: Any = ...
|
||||
workers_http: Any = ...
|
||||
workers_cron: Any = ...
|
||||
workers: Any = ...
|
||||
generation: int = ...
|
||||
queue: Any = ...
|
||||
long_polling_pid: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def pipe_new(self): ...
|
||||
def pipe_ping(self, pipe: Any) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def worker_spawn(self, klass: Any, workers_registry: Any): ...
|
||||
def long_polling_spawn(self) -> None: ...
|
||||
def worker_pop(self, pid: Any) -> None: ...
|
||||
def worker_kill(self, pid: Any, sig: Any) -> None: ...
|
||||
def process_signals(self) -> None: ...
|
||||
def process_zombie(self) -> None: ...
|
||||
def process_timeout(self) -> None: ...
|
||||
def process_spawn(self) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
pipe: Any = ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self, graceful: bool = ...) -> None: ...
|
||||
def run(self, preload: Any, stop: Any): ...
|
||||
|
||||
class Worker:
|
||||
multi: Any = ...
|
||||
watchdog_time: Any = ...
|
||||
watchdog_pipe: Any = ...
|
||||
eintr_pipe: Any = ...
|
||||
watchdog_timeout: Any = ...
|
||||
ppid: Any = ...
|
||||
pid: Any = ...
|
||||
alive: bool = ...
|
||||
request_max: Any = ...
|
||||
request_count: int = ...
|
||||
def __init__(self, multi: Any) -> None: ...
|
||||
def setproctitle(self, title: str = ...) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def signal_time_expired_handler(self, n: Any, stack: Any) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
def check_limits(self) -> None: ...
|
||||
def process_work(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def _runloop(self) -> None: ...
|
||||
|
||||
class WorkerHTTP(Worker):
|
||||
def process_request(self, client: Any, addr: Any) -> None: ...
|
||||
def process_work(self) -> None: ...
|
||||
server: Any = ...
|
||||
def start(self) -> None: ...
|
||||
|
||||
class WorkerCron(Worker):
|
||||
db_index: int = ...
|
||||
watchdog_timeout: Any = ...
|
||||
def __init__(self, multi: Any) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
def _db_list(self): ...
|
||||
def process_work(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
|
||||
server: Any
|
||||
|
||||
def load_server_wide_modules() -> None: ...
|
||||
def _reexec(updated_modules: Optional[Any] = ...) -> None: ...
|
||||
def load_test_file_py(registry: Any, test_file: Any) -> None: ...
|
||||
def preload_registries(dbnames: Any): ...
|
||||
def start(preload: Optional[Any] = ..., stop: bool = ...): ...
|
||||
def restart() -> None: ...
|
||||
18
odoo-stubs/service/wsgi_server.pyi
Normal file
18
odoo-stubs/service/wsgi_server.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from odoo.tools import config as config
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
RPC_FAULT_CODE_CLIENT_ERROR: int
|
||||
RPC_FAULT_CODE_APPLICATION_ERROR: int
|
||||
RPC_FAULT_CODE_WARNING: int
|
||||
RPC_FAULT_CODE_ACCESS_DENIED: int
|
||||
RPC_FAULT_CODE_ACCESS_ERROR: int
|
||||
|
||||
def xmlrpc_handle_exception_int(e: Any): ...
|
||||
def xmlrpc_handle_exception_string(e: Any): ...
|
||||
def _patch_xmlrpc_marshaller() -> None: ...
|
||||
def application_unproxied(environ: Any, start_response: Any): ...
|
||||
|
||||
ProxyFix: Any
|
||||
|
||||
def application(environ: Any, start_response: Any): ...
|
||||
@@ -1,4 +1,7 @@
|
||||
import psycopg2.extensions
|
||||
from . import tools as tools
|
||||
from .tools import pycompat as pycompat, ustr as ustr
|
||||
from .tools.func import frame_codeinfo as frame_codeinfo
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
14
odoo-stubs/tools/__init__.pyi
Normal file
14
odoo-stubs/tools/__init__.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from .misc import *
|
||||
from .convert import *
|
||||
from .translate import *
|
||||
from .image import *
|
||||
from .sql import *
|
||||
from .float_utils import *
|
||||
from .mail import *
|
||||
from .func import *
|
||||
from .debugger import *
|
||||
from .xml_utils import *
|
||||
from .date_utils import *
|
||||
from . import appdirs as appdirs, pdf as pdf, pycompat as pycompat, win32 as win32
|
||||
from .config import config as config
|
||||
from .graph import graph as graph
|
||||
39
odoo-stubs/tools/appdirs.pyi
Normal file
39
odoo-stubs/tools/appdirs.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
from . import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
__version_info__: Any
|
||||
__version__: Any
|
||||
|
||||
def user_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
||||
def site_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
||||
def user_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
||||
def site_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
||||
def user_cache_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: bool = ...): ...
|
||||
def user_log_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: bool = ...): ...
|
||||
|
||||
class AppDirs:
|
||||
appname: Any = ...
|
||||
appauthor: Any = ...
|
||||
version: Any = ...
|
||||
roaming: Any = ...
|
||||
multipath: Any = ...
|
||||
def __init__(self, appname: Any, appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
||||
@property
|
||||
def user_data_dir(self): ...
|
||||
@property
|
||||
def site_data_dir(self): ...
|
||||
@property
|
||||
def user_config_dir(self): ...
|
||||
@property
|
||||
def site_config_dir(self): ...
|
||||
@property
|
||||
def user_cache_dir(self): ...
|
||||
@property
|
||||
def user_log_dir(self): ...
|
||||
|
||||
def _get_win_folder_from_registry(csidl_name: Any): ...
|
||||
def _get_win_folder_with_pywin32(csidl_name: Any): ...
|
||||
def _get_win_folder_with_ctypes(csidl_name: Any): ...
|
||||
_get_win_folder = _get_win_folder_with_pywin32
|
||||
_get_win_folder = _get_win_folder_with_ctypes
|
||||
_get_win_folder = _get_win_folder_from_registry
|
||||
10
odoo-stubs/tools/assertion_report.pyi
Normal file
10
odoo-stubs/tools/assertion_report.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
class assertion_report:
|
||||
successes: int = ...
|
||||
failures: int = ...
|
||||
def __init__(self) -> None: ...
|
||||
def record_success(self) -> None: ...
|
||||
def record_failure(self) -> None: ...
|
||||
def record_result(self, result: Any) -> None: ...
|
||||
def __str__(self): ...
|
||||
51
odoo-stubs/tools/cache.pyi
Normal file
51
odoo-stubs/tools/cache.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
from . import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
unsafe_eval = eval
|
||||
_logger: Any
|
||||
|
||||
class ormcache_counter:
|
||||
__slots__: Any = ...
|
||||
hit: int = ...
|
||||
miss: int = ...
|
||||
err: int = ...
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def ratio(self): ...
|
||||
|
||||
STAT: Any
|
||||
|
||||
class ormcache:
|
||||
args: Any = ...
|
||||
skiparg: Any = ...
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
method: Any = ...
|
||||
def __call__(self, method: Any): ...
|
||||
key: Any = ...
|
||||
def determine_key(self): ...
|
||||
def lru(self, model: Any): ...
|
||||
def lookup(self, method: Any, *args: Any, **kwargs: Any): ...
|
||||
def clear(self, model: Any, *args: Any) -> None: ...
|
||||
|
||||
class ormcache_context(ormcache):
|
||||
keys: Any = ...
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
key: Any = ...
|
||||
def determine_key(self) -> None: ...
|
||||
|
||||
class ormcache_multi(ormcache):
|
||||
multi: Any = ...
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
key_multi: Any = ...
|
||||
multi_pos: Any = ...
|
||||
def determine_key(self) -> None: ...
|
||||
def lookup(self, method: Any, *args: Any, **kwargs: Any): ...
|
||||
|
||||
class dummy_cache:
|
||||
def __init__(self, *l: Any, **kw: Any) -> None: ...
|
||||
def __call__(self, fn: Any): ...
|
||||
def clear(self, *l: Any, **kw: Any) -> None: ...
|
||||
|
||||
def log_ormcache_stats(sig: Optional[Any] = ..., frame: Optional[Any] = ...): ...
|
||||
def get_cache_key_counter(bound_method: Any, *args: Any, **kwargs: Any): ...
|
||||
cache = ormcache
|
||||
47
odoo-stubs/tools/config.pyi
Normal file
47
odoo-stubs/tools/config.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
import optparse
|
||||
from . import appdirs as appdirs, pycompat as pycompat
|
||||
from .. import conf as conf, loglevels as loglevels, release as release
|
||||
from typing import Any, Optional
|
||||
|
||||
crypt_context: Any
|
||||
|
||||
class MyOption(optparse.Option):
|
||||
my_default: Any = ...
|
||||
def __init__(self, *opts: Any, **attrs: Any) -> None: ...
|
||||
|
||||
DEFAULT_LOG_HANDLER: str
|
||||
|
||||
def _get_default_datadir(): ...
|
||||
def _deduplicate_loggers(loggers: Any): ...
|
||||
|
||||
class configmanager:
|
||||
options: Any = ...
|
||||
blacklist_for_save: Any = ...
|
||||
casts: Any = ...
|
||||
misc: Any = ...
|
||||
config_file: Any = ...
|
||||
_LOGLEVELS: Any = ...
|
||||
parser: Any = ...
|
||||
def __init__(self, fname: Optional[Any] = ...) -> None: ...
|
||||
def parse_config(self, args: Optional[Any] = ...) -> None: ...
|
||||
rcfile: Any = ...
|
||||
def _parse_config(self, args: Optional[Any] = ...) -> None: ...
|
||||
def _is_addons_path(self, path: Any): ...
|
||||
def _check_addons_path(self, option: Any, opt: Any, value: Any, parser: Any) -> None: ...
|
||||
def _test_enable_callback(self, option: Any, opt: Any, value: Any, parser: Any) -> None: ...
|
||||
def load(self) -> None: ...
|
||||
def save(self) -> None: ...
|
||||
def get(self, key: Any, default: Optional[Any] = ...): ...
|
||||
def pop(self, key: Any, default: Optional[Any] = ...): ...
|
||||
def get_misc(self, sect: Any, key: Any, default: Optional[Any] = ...): ...
|
||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
||||
def __getitem__(self, key: Any): ...
|
||||
@property
|
||||
def addons_data_dir(self): ...
|
||||
@property
|
||||
def session_dir(self): ...
|
||||
def filestore(self, dbname: Any): ...
|
||||
def set_admin_password(self, new_password: Any) -> None: ...
|
||||
def verify_admin_password(self, password: Any): ...
|
||||
|
||||
config: Any
|
||||
64
odoo-stubs/tools/convert.pyi
Normal file
64
odoo-stubs/tools/convert.pyi
Normal file
@@ -0,0 +1,64 @@
|
||||
from . import assertion_report as assertion_report, pycompat as pycompat
|
||||
from .config import config as config
|
||||
from .misc import SKIPPED_ELEMENT_TYPES as SKIPPED_ELEMENT_TYPES, file_open as file_open, unquote as unquote, ustr as ustr
|
||||
from .translate import _ as _
|
||||
from odoo import SUPERUSER_ID as SUPERUSER_ID
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
safe_eval: Any
|
||||
|
||||
class ParseError(Exception):
|
||||
msg: Any = ...
|
||||
text: Any = ...
|
||||
filename: Any = ...
|
||||
lineno: Any = ...
|
||||
def __init__(self, msg: Any, text: Any, filename: Any, lineno: Any) -> None: ...
|
||||
def __str__(self): ...
|
||||
|
||||
class RecordDictWrapper(dict):
|
||||
record: Any = ...
|
||||
def __init__(self, record: Any) -> None: ...
|
||||
def __getitem__(self, key: Any): ...
|
||||
|
||||
def _get_idref(self, env: Any, model_str: Any, idref: Any): ...
|
||||
def _fix_multiple_roots(node: Any) -> None: ...
|
||||
def _eval_xml(self, node: Any, env: Any): ...
|
||||
def str2bool(value: Any): ...
|
||||
|
||||
class xml_import:
|
||||
@staticmethod
|
||||
def nodeattr2bool(node: Any, attr: Any, default: bool = ...): ...
|
||||
def isnoupdate(self, data_node: Optional[Any] = ...): ...
|
||||
def get_context(self, data_node: Any, node: Any, eval_dict: Any): ...
|
||||
def get_uid(self, data_node: Any, node: Any): ...
|
||||
def make_xml_id(self, xml_id: Any): ...
|
||||
def _test_xml_id(self, xml_id: Any) -> None: ...
|
||||
def _tag_delete(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
||||
def _tag_report(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
||||
def _tag_function(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
||||
def _tag_act_window(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
||||
def _tag_menuitem(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
||||
def _assert_equals(self, f1: Any, f2: Any, prec: int = ...): ...
|
||||
def _tag_assert(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
||||
def _tag_record(self, rec: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
||||
def _tag_template(self, el: Any, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
||||
def id_get(self, id_str: Any, raise_if_not_found: bool = ...): ...
|
||||
def model_id_get(self, id_str: Any, raise_if_not_found: bool = ...): ...
|
||||
def parse(self, de: Any, mode: Optional[Any] = ...): ...
|
||||
mode: Any = ...
|
||||
module: Any = ...
|
||||
env: Any = ...
|
||||
cr: Any = ...
|
||||
uid: Any = ...
|
||||
idref: Any = ...
|
||||
assertion_report: Any = ...
|
||||
noupdate: Any = ...
|
||||
xml_filename: Any = ...
|
||||
_tags: Any = ...
|
||||
def __init__(self, cr: Any, module: Any, idref: Any, mode: Any, report: Optional[Any] = ..., noupdate: bool = ..., xml_filename: Optional[Any] = ...) -> None: ...
|
||||
|
||||
def convert_file(cr: Any, module: Any, filename: Any, idref: Any, mode: str = ..., noupdate: bool = ..., kind: Optional[Any] = ..., report: Optional[Any] = ..., pathname: Optional[Any] = ...) -> None: ...
|
||||
def convert_sql_import(cr: Any, fp: Any) -> None: ...
|
||||
def convert_csv_import(cr: Any, module: Any, fname: Any, csvcontent: Any, idref: Optional[Any] = ..., 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] = ...): ...
|
||||
14
odoo-stubs/tools/date_utils.pyi
Normal file
14
odoo-stubs/tools/date_utils.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from . import ustr as ustr
|
||||
from .func import lazy as lazy
|
||||
from typing import Any
|
||||
|
||||
def get_month(date: Any): ...
|
||||
def get_quarter_number(date: Any): ...
|
||||
def get_quarter(date: Any): ...
|
||||
def get_fiscal_year(date: Any, day: int = ..., month: int = ...): ...
|
||||
def start_of(value: Any, granularity: Any): ...
|
||||
def end_of(value: Any, granularity: Any): ...
|
||||
def add(value: Any, *args: Any, **kwargs: Any): ...
|
||||
def subtract(value: Any, *args: Any, **kwargs: Any): ...
|
||||
def json_default(obj: Any): ...
|
||||
def date_range(start: Any, end: Any, step: Any = ...): ...
|
||||
6
odoo-stubs/tools/debugger.pyi
Normal file
6
odoo-stubs/tools/debugger.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
SUPPORTED_DEBUGGER: Any
|
||||
|
||||
def post_mortem(config: Any, info: Any) -> None: ...
|
||||
15
odoo-stubs/tools/float_utils.pyi
Normal file
15
odoo-stubs/tools/float_utils.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
def round(f: Any): ...
|
||||
round = round
|
||||
|
||||
def _float_check_precision(precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
||||
def float_round(value: Any, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ..., rounding_method: str = ...): ...
|
||||
def float_is_zero(value: Any, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
||||
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
|
||||
|
||||
def float_split_str(value: Any, precision_digits: Any): ...
|
||||
def float_split(value: Any, precision_digits: Any): ...
|
||||
116
odoo-stubs/tools/func.pyi
Normal file
116
odoo-stubs/tools/func.pyi
Normal file
@@ -0,0 +1,116 @@
|
||||
from json import JSONEncoder as JSONEncoder
|
||||
from typing import Any
|
||||
|
||||
__all__: Any
|
||||
|
||||
class lazy_property:
|
||||
fget: Any = ...
|
||||
def __init__(self, fget: Any) -> None: ...
|
||||
def __get__(self, obj: Any, cls: Any): ...
|
||||
@property
|
||||
def __doc__(self): ...
|
||||
@staticmethod
|
||||
def reset_all(obj: Any) -> None: ...
|
||||
|
||||
class lazy_classproperty(lazy_property):
|
||||
def __get__(self, obj: Any, cls: Any): ...
|
||||
|
||||
def conditional(condition: Any, decorator: Any): ...
|
||||
def synchronized(lock_attr: str = ...): ...
|
||||
def frame_codeinfo(fframe: Any, back: int = ...): ...
|
||||
def compose(a: Any, b: Any): ...
|
||||
|
||||
class _ClassProperty(property):
|
||||
def __get__(self, cls: Any, owner: Any): ...
|
||||
|
||||
def classproperty(func: Any): ...
|
||||
|
||||
class lazy:
|
||||
__slots__: Any = ...
|
||||
def __init__(self, func: Any, *args: Any, **kwargs: Any) -> None: ...
|
||||
@property
|
||||
def _value(self): ...
|
||||
def __getattr__(self, name: Any): ...
|
||||
def __setattr__(self, name: Any, value: Any): ...
|
||||
def __delattr__(self, name: Any): ...
|
||||
def __repr__(self): ...
|
||||
def __str__(self): ...
|
||||
def __bytes__(self): ...
|
||||
def __format__(self, format_spec: Any): ...
|
||||
def __lt__(self, other: Any) -> Any: ...
|
||||
def __le__(self, other: Any) -> Any: ...
|
||||
def __eq__(self, other: Any) -> Any: ...
|
||||
def __ne__(self, other: Any) -> Any: ...
|
||||
def __gt__(self, other: Any) -> Any: ...
|
||||
def __ge__(self, other: Any) -> Any: ...
|
||||
def __hash__(self) -> Any: ...
|
||||
def __bool__(self): ...
|
||||
def __call__(self, *args: Any, **kwargs: Any): ...
|
||||
def __len__(self): ...
|
||||
def __getitem__(self, key: Any): ...
|
||||
def __missing__(self, key: Any): ...
|
||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
||||
def __delitem__(self, key: Any) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __reversed__(self): ...
|
||||
def __contains__(self, key: Any): ...
|
||||
def __add__(self, other: Any): ...
|
||||
def __sub__(self, other: Any): ...
|
||||
def __mul__(self, other: Any): ...
|
||||
def __matmul__(self, other: Any): ...
|
||||
def __truediv__(self, other: Any): ...
|
||||
def __floordiv__(self, other: Any): ...
|
||||
def __mod__(self, other: Any): ...
|
||||
def __divmod__(self, other: Any): ...
|
||||
def __pow__(self, other: Any): ...
|
||||
def __lshift__(self, other: Any): ...
|
||||
def __rshift__(self, other: Any): ...
|
||||
def __and__(self, other: Any): ...
|
||||
def __xor__(self, other: Any): ...
|
||||
def __or__(self, other: Any): ...
|
||||
def __radd__(self, other: Any): ...
|
||||
def __rsub__(self, other: Any): ...
|
||||
def __rmul__(self, other: Any): ...
|
||||
def __rmatmul__(self, other: Any): ...
|
||||
def __rtruediv__(self, other: Any): ...
|
||||
def __rfloordiv__(self, other: Any): ...
|
||||
def __rmod__(self, other: Any): ...
|
||||
def __rdivmod__(self, other: Any): ...
|
||||
def __rpow__(self, other: Any): ...
|
||||
def __rlshift__(self, other: Any): ...
|
||||
def __rrshift__(self, other: Any): ...
|
||||
def __rand__(self, other: Any): ...
|
||||
def __rxor__(self, other: Any): ...
|
||||
def __ror__(self, other: Any): ...
|
||||
def __iadd__(self, other: Any): ...
|
||||
def __isub__(self, other: Any): ...
|
||||
def __imul__(self, other: Any): ...
|
||||
def __imatmul__(self, other: Any): ...
|
||||
def __itruediv__(self, other: Any): ...
|
||||
def __ifloordiv__(self, other: Any): ...
|
||||
def __imod__(self, other: Any): ...
|
||||
def __ipow__(self, other: Any): ...
|
||||
def __ilshift__(self, other: Any): ...
|
||||
def __irshift__(self, other: Any): ...
|
||||
def __iand__(self, other: Any): ...
|
||||
def __ixor__(self, other: Any): ...
|
||||
def __ior__(self, other: Any): ...
|
||||
def __neg__(self): ...
|
||||
def __pos__(self): ...
|
||||
def __abs__(self): ...
|
||||
def __invert__(self): ...
|
||||
def __complex__(self): ...
|
||||
def __int__(self): ...
|
||||
def __float__(self): ...
|
||||
def __index__(self): ...
|
||||
def __round__(self): ...
|
||||
def __trunc__(self): ...
|
||||
def __floor__(self): ...
|
||||
def __ceil__(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
||||
def __await__(self): ...
|
||||
def __aiter__(self): ...
|
||||
def __anext__(self): ...
|
||||
def __aenter__(self): ...
|
||||
def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
||||
54
odoo-stubs/tools/graph.pyi
Normal file
54
odoo-stubs/tools/graph.pyi
Normal file
@@ -0,0 +1,54 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
class graph:
|
||||
nodes: Any = ...
|
||||
edges: Any = ...
|
||||
no_ancester: Any = ...
|
||||
transitions: Any = ...
|
||||
result: Any = ...
|
||||
def __init__(self, nodes: Any, transitions: Any, no_ancester: Optional[Any] = ...) -> None: ...
|
||||
edge_wt: Any = ...
|
||||
def init_rank(self) -> None: ...
|
||||
reachable_nodes: Any = ...
|
||||
tree_edges: Any = ...
|
||||
def tight_tree(self): ...
|
||||
def reachable_node(self, node: Any) -> None: ...
|
||||
cut_edges: Any = ...
|
||||
head_nodes: Any = ...
|
||||
def init_cutvalues(self) -> None: ...
|
||||
def head_component(self, node: Any, rest_edges: Any) -> None: ...
|
||||
def process_ranking(self, node: Any, level: int = ...) -> None: ...
|
||||
def make_acyclic(self, parent: Any, node: Any, level: Any, tree: Any): ...
|
||||
def rev_edges(self, tree: Any): ...
|
||||
def exchange(self, e: Any, f: Any) -> None: ...
|
||||
def enter_edge(self, edge: Any): ...
|
||||
def leave_edge(self): ...
|
||||
def finalize_rank(self, node: Any, level: Any) -> None: ...
|
||||
def normalize(self) -> None: ...
|
||||
def make_chain(self) -> None: ...
|
||||
def init_order(self, node: Any, level: Any) -> None: ...
|
||||
def order_heuristic(self) -> None: ...
|
||||
def wmedian(self) -> None: ...
|
||||
def median_value(self, node: Any, adj_rank: Any): ...
|
||||
def adj_position(self, node: Any, adj_rank: Any): ...
|
||||
levels: Any = ...
|
||||
def preprocess_order(self) -> None: ...
|
||||
def graph_order(self) -> None: ...
|
||||
def tree_order(self, node: Any, last: int = ...): ...
|
||||
max_order: Any = ...
|
||||
def process_order(self) -> None: ...
|
||||
partial_order: Any = ...
|
||||
def find_starts(self) -> None: ...
|
||||
critical_edges: Any = ...
|
||||
links: Any = ...
|
||||
Is_Cyclic: bool = ...
|
||||
def rank(self) -> None: ...
|
||||
order: Any = ...
|
||||
def order_in_rank(self): ...
|
||||
start_nodes: Any = ...
|
||||
tree_list: Any = ...
|
||||
start: Any = ...
|
||||
def process(self, starting_node: Any) -> None: ...
|
||||
def __str__(self): ...
|
||||
def scale(self, maxx: Any, maxy: Any, nwidth: int = ..., nheight: int = ..., margin: int = ...) -> None: ...
|
||||
def result_get(self): ...
|
||||
16
odoo-stubs/tools/image.pyi
Normal file
16
odoo-stubs/tools/image.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
FILETYPE_BASE64_MAGICWORD: Any
|
||||
|
||||
def image_resize_image(base64_source: Any, size: Any = ..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ..., upper_limit: bool = ...): ...
|
||||
def image_resize_and_sharpen(image: Any, size: Any, preserve_aspect_ratio: bool = ..., factor: float = ..., upper_limit: bool = ...): ...
|
||||
def image_save_for_web(image: Any, fp: Optional[Any] = ..., format: Optional[Any] = ...): ...
|
||||
def image_resize_image_big(base64_source: Any, size: Any = ..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
||||
def image_resize_image_medium(base64_source: Any, size: Any = ..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
||||
def image_resize_image_small(base64_source: Any, size: Any = ..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
||||
def crop_image(data: Any, type: str = ..., ratio: bool = ..., size: Optional[Any] = ..., image_format: Optional[Any] = ...): ...
|
||||
def image_colorize(original: Any, randomize: bool = ..., color: Any = ...): ...
|
||||
def image_get_resized_images(base64_source: Any, return_big: bool = ..., return_medium: bool = ..., return_small: bool = ..., big_name: str = ..., medium_name: str = ..., small_name: str = ..., avoid_resize_big: bool = ..., avoid_resize_medium: bool = ..., avoid_resize_small: bool = ..., sizes: Any = ...): ...
|
||||
def image_resize_images(vals: Any, big_name: str = ..., medium_name: str = ..., small_name: str = ..., sizes: Any = ...) -> None: ...
|
||||
def image_data_uri(base64_source: Any): ...
|
||||
33
odoo-stubs/tools/lru.pyi
Normal file
33
odoo-stubs/tools/lru.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
from .func import synchronized as synchronized
|
||||
from typing import Any, Optional
|
||||
|
||||
__all__: Any
|
||||
|
||||
class LRUNode:
|
||||
__slots__: Any = ...
|
||||
prev: Any = ...
|
||||
me: Any = ...
|
||||
next: Any = ...
|
||||
def __init__(self, prev: Any, me: Any) -> None: ...
|
||||
|
||||
class LRU:
|
||||
_lock: Any = ...
|
||||
count: Any = ...
|
||||
d: Any = ...
|
||||
first: Any = ...
|
||||
last: Any = ...
|
||||
def __init__(self, count: Any, pairs: Any = ...) -> None: ...
|
||||
def __contains__(self, obj: Any): ...
|
||||
def get(self, obj: Any, val: Optional[Any] = ...): ...
|
||||
def __getitem__(self, obj: Any): ...
|
||||
def __setitem__(self, obj: Any, val: Any) -> None: ...
|
||||
def __delitem__(self, obj: Any) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __len__(self): ...
|
||||
def iteritems(self) -> None: ...
|
||||
items: Any = ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def keys(self): ...
|
||||
def pop(self, key: Any): ...
|
||||
def clear(self) -> None: ...
|
||||
43
odoo-stubs/tools/mail.pyi
Normal file
43
odoo-stubs/tools/mail.pyi
Normal file
@@ -0,0 +1,43 @@
|
||||
from lxml.html import clean
|
||||
from odoo.loglevels import ustr as ustr
|
||||
from odoo.tools import misc as misc, pycompat as pycompat
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
tags_to_kill: Any
|
||||
tags_to_remove: Any
|
||||
allowed_tags: Any
|
||||
safe_attrs: Any
|
||||
|
||||
class _Cleaner(clean.Cleaner):
|
||||
_style_re: Any = ...
|
||||
_style_whitelist: Any = ...
|
||||
strip_classes: bool = ...
|
||||
sanitize_style: bool = ...
|
||||
def __call__(self, doc: Any) -> None: ...
|
||||
def tag_quote(self, el: Any): ...
|
||||
def strip_class(self, el: Any) -> None: ...
|
||||
def parse_style(self, el: Any) -> None: ...
|
||||
def allow_element(self, el: Any): ...
|
||||
|
||||
def html_sanitize(src: Any, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ..., strip_style: bool = ..., strip_classes: bool = ...): ...
|
||||
def html_keep_url(text: Any): ...
|
||||
def html2plaintext(html: Any, body_id: Optional[Any] = ..., encoding: str = ...): ...
|
||||
def plaintext2html(text: Any, container_tag: bool = ...): ...
|
||||
def append_content_to_html(html: Any, content: Any, plaintext: bool = ..., preserve: bool = ..., container_tag: bool = ...): ...
|
||||
|
||||
email_re: Any
|
||||
single_email_re: Any
|
||||
reference_re: Any
|
||||
discussion_re: Any
|
||||
mail_header_msgid_re: Any
|
||||
email_addr_escapes_re: Any
|
||||
|
||||
def generate_tracking_message_id(res_id: Any): ...
|
||||
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_split(text: Any): ...
|
||||
def email_split_and_format(text: Any): ...
|
||||
def email_escape_char(email_address: Any): ...
|
||||
def email_references(references: Any): ...
|
||||
def decode_smtp_header(smtp_header: Any): ...
|
||||
def decode_message_header(message: Any, header: Any, separator: str = ...): ...
|
||||
26
odoo-stubs/tools/mimetypes.pyi
Normal file
26
odoo-stubs/tools/mimetypes.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
from collections import namedtuple
|
||||
from typing import Any
|
||||
|
||||
__all__: Any
|
||||
_logger: Any
|
||||
_ooxml_dirs: Any
|
||||
|
||||
def _check_ooxml(data: Any): ...
|
||||
|
||||
_mime_validator: Any
|
||||
|
||||
def _check_open_container_format(data: Any): ...
|
||||
|
||||
_xls_pattern: Any
|
||||
_ppt_pattern: Any
|
||||
|
||||
def _check_olecf(data: Any): ...
|
||||
def _check_svg(data: Any): ...
|
||||
|
||||
_Entry = namedtuple('_Entry', ['mimetype', 'signatures', 'discriminants'])
|
||||
_mime_mappings: Any
|
||||
|
||||
def guess_mimetype(bin_data: Any, default: str = ...): ...
|
||||
|
||||
guess_mimetype: Any
|
||||
ms: Any
|
||||
188
odoo-stubs/tools/misc.pyi
Normal file
188
odoo-stubs/tools/misc.pyi
Normal file
@@ -0,0 +1,188 @@
|
||||
from .cache import *
|
||||
import pickle as pickle_
|
||||
import xlsxwriter
|
||||
import xlwt
|
||||
from . import pycompat as pycompat
|
||||
from .config import config as config
|
||||
from .parse_version import parse_version as parse_version
|
||||
from .which import which as which
|
||||
from collections import Mapping, MutableMapping, MutableSet, defaultdict
|
||||
from itertools import repeat as repeat
|
||||
from odoo.loglevels import exception_to_unicode as exception_to_unicode, get_encodings as get_encodings, ustr as ustr
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
SKIPPED_ELEMENT_TYPES: Any
|
||||
|
||||
def find_in_path(name: Any): ...
|
||||
def _exec_pipe(prog: Any, args: Any, env: Optional[Any] = ...): ...
|
||||
def exec_command_pipe(name: Any, *args: Any): ...
|
||||
def find_pg_tool(name: Any): ...
|
||||
def exec_pg_environ(): ...
|
||||
def exec_pg_command(name: Any, *args: Any) -> None: ...
|
||||
def exec_pg_command_pipe(name: Any, *args: Any): ...
|
||||
def file_open(name: Any, mode: str = ..., subdir: str = ..., pathinfo: bool = ...): ...
|
||||
def _fileopen(path: Any, mode: Any, basedir: Any, pathinfo: Any, basename: Optional[Any] = ...): ...
|
||||
def flatten(list: Any): ...
|
||||
def reverse_enumerate(l: Any): ...
|
||||
def partition(pred: Any, elems: Any): ...
|
||||
def topological_sort(elems: Any): ...
|
||||
|
||||
class PatchedWorkbook(xlwt.Workbook):
|
||||
def add_sheet(self, name: Any, cell_overwrite_ok: bool = ...): ...
|
||||
|
||||
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
|
||||
def add_worksheet(self, name: Optional[Any] = ..., **kw: Any): ...
|
||||
|
||||
def to_xml(s: Any): ...
|
||||
def get_iso_codes(lang: Any): ...
|
||||
def scan_languages(): ...
|
||||
def get_user_companies(cr: Any, user: Any): ...
|
||||
def mod10r(number: Any): ...
|
||||
def str2bool(s: Any, default: Optional[Any] = ...): ...
|
||||
def human_size(sz: Any): ...
|
||||
def logged(f: Any): ...
|
||||
|
||||
class profile:
|
||||
fname: Any = ...
|
||||
def __init__(self, fname: Optional[Any] = ...) -> None: ...
|
||||
def __call__(self, f: Any): ...
|
||||
|
||||
def detect_ip_addr(): ...
|
||||
|
||||
DEFAULT_SERVER_DATE_FORMAT: str
|
||||
DEFAULT_SERVER_TIME_FORMAT: str
|
||||
DEFAULT_SERVER_DATETIME_FORMAT: Any
|
||||
DATE_LENGTH: Any
|
||||
DATETIME_FORMATS_MAP: Any
|
||||
POSIX_TO_LDML: Any
|
||||
|
||||
def posix_to_ldml(fmt: Any, locale: Any): ...
|
||||
def split_every(n: Any, iterable: Any, piece_maker: Any = ...) -> None: ...
|
||||
def get_and_group_by_field(cr: Any, uid: Any, obj: Any, ids: Any, field: Any, context: Optional[Any] = ...): ...
|
||||
def get_and_group_by_company(cr: Any, uid: Any, obj: Any, ids: Any, context: Optional[Any] = ...): ...
|
||||
def resolve_attr(obj: Any, attr: Any): ...
|
||||
def attrgetter(*items: Any): ...
|
||||
def remove_accents(input_str: Any): ...
|
||||
|
||||
class unquote(str):
|
||||
def __repr__(self): ...
|
||||
|
||||
class UnquoteEvalContext(defaultdict):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def __missing__(self, key: Any): ...
|
||||
|
||||
class mute_logger:
|
||||
loggers: Any = ...
|
||||
def __init__(self, *loggers: Any) -> None: ...
|
||||
def filter(self, record: Any): ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, exc_type: Optional[Any] = ..., exc_val: Optional[Any] = ..., exc_tb: Optional[Any] = ...) -> None: ...
|
||||
def __call__(self, func: Any): ...
|
||||
|
||||
_ph: Any
|
||||
|
||||
class CountingStream:
|
||||
stream: Any = ...
|
||||
index: Any = ...
|
||||
stopped: bool = ...
|
||||
def __init__(self, stream: Any, start: int = ...) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def next(self): ...
|
||||
__next__: Any = ...
|
||||
|
||||
def stripped_sys_argv(*strip_args: Any): ...
|
||||
|
||||
class ConstantMapping(Mapping):
|
||||
__slots__: Any = ...
|
||||
_value: Any = ...
|
||||
def __init__(self, val: Any) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __getitem__(self, item: Any): ...
|
||||
|
||||
def dumpstacks(sig: Optional[Any] = ..., frame: Optional[Any] = ..., thread_idents: Optional[Any] = ...) -> None: ...
|
||||
def freehash(arg: Any): ...
|
||||
def clean_context(context: Any): ...
|
||||
|
||||
class frozendict(dict):
|
||||
def __delitem__(self, key: Any) -> None: ...
|
||||
def __setitem__(self, key: Any, val: Any) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def pop(self, key: Any, default: Optional[Any] = ...) -> None: ...
|
||||
def popitem(self) -> None: ...
|
||||
def setdefault(self, key: Any, default: Optional[Any] = ...) -> None: ...
|
||||
def update(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def __hash__(self) -> Any: ...
|
||||
|
||||
class Collector(Mapping):
|
||||
__slots__: Any = ...
|
||||
_map: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def add(self, key: Any, val: Any) -> None: ...
|
||||
def __getitem__(self, key: Any): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __len__(self): ...
|
||||
|
||||
class StackMap(MutableMapping):
|
||||
__slots__: Any = ...
|
||||
_maps: Any = ...
|
||||
def __init__(self, m: Optional[Any] = ...) -> None: ...
|
||||
def __getitem__(self, key: Any): ...
|
||||
def __setitem__(self, key: Any, val: Any) -> None: ...
|
||||
def __delitem__(self, key: Any) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __len__(self): ...
|
||||
def __str__(self): ...
|
||||
def pushmap(self, m: Optional[Any] = ...) -> None: ...
|
||||
def popmap(self): ...
|
||||
|
||||
class OrderedSet(MutableSet):
|
||||
__slots__: Any = ...
|
||||
_map: Any = ...
|
||||
def __init__(self, elems: Any = ...) -> None: ...
|
||||
def __contains__(self, elem: Any): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __len__(self): ...
|
||||
def add(self, elem: Any) -> None: ...
|
||||
def discard(self, elem: Any) -> None: ...
|
||||
|
||||
class LastOrderedSet(OrderedSet):
|
||||
def add(self, elem: Any) -> None: ...
|
||||
|
||||
def groupby(iterable: Any, key: Optional[Any] = ...): ...
|
||||
def unique(it: Any) -> None: ...
|
||||
|
||||
class Reverse:
|
||||
__slots__: Any = ...
|
||||
val: Any = ...
|
||||
def __init__(self, val: Any) -> None: ...
|
||||
def __eq__(self, other: Any) -> Any: ...
|
||||
def __ne__(self, other: Any) -> Any: ...
|
||||
def __ge__(self, other: Any) -> Any: ...
|
||||
def __gt__(self, other: Any) -> Any: ...
|
||||
def __le__(self, other: Any) -> Any: ...
|
||||
def __lt__(self, other: Any) -> Any: ...
|
||||
|
||||
def ignore(*exc: Any) -> None: ...
|
||||
def html_escape(text: Any): ...
|
||||
def formatLang(env: Any, value: Any, digits: Optional[Any] = ..., grouping: bool = ..., monetary: bool = ..., dp: bool = ..., currency_obj: bool = ...): ...
|
||||
def format_date(env: Any, value: Any, lang_code: bool = ..., date_format: bool = ...): ...
|
||||
def _consteq(str1: Any, str2: Any): ...
|
||||
|
||||
consteq: Any
|
||||
|
||||
class Unpickler(pickle_.Unpickler):
|
||||
find_global: Any = ...
|
||||
find_class: Any = ...
|
||||
|
||||
def _pickle_load(stream: Any, encoding: str = ..., errors: bool = ...): ...
|
||||
|
||||
pickle: Any
|
||||
|
||||
def wrap_module(module: Any, attr_list: Any): ...
|
||||
|
||||
class DotDict(dict):
|
||||
def __getattr__(self, attrib: Any): ...
|
||||
|
||||
def traverse_containers(val: Any, type_: Any) -> None: ...
|
||||
15
odoo-stubs/tools/osutil.pyi
Normal file
15
odoo-stubs/tools/osutil.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
import ctypes
|
||||
from odoo.release import nt_service_name as nt_service_name
|
||||
from typing import Any, Optional
|
||||
|
||||
def listdir(dir: Any, recursive: bool = ...): ...
|
||||
def walksymlinks(top: Any, topdown: bool = ..., onerror: Optional[Any] = ...) -> None: ...
|
||||
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
|
||||
|
||||
class _PROCESSENTRY32(ctypes.Structure):
|
||||
_fields_: Any = ...
|
||||
8
odoo-stubs/tools/parse_version.pyi
Normal file
8
odoo-stubs/tools/parse_version.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from odoo.tools import pycompat as pycompat
|
||||
from typing import Any
|
||||
|
||||
component_re: Any
|
||||
replace: Any
|
||||
|
||||
def _parse_version_parts(s: Any) -> None: ...
|
||||
def parse_version(s: Any): ...
|
||||
3
odoo-stubs/tools/pdf.pyi
Normal file
3
odoo-stubs/tools/pdf.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
def merge_pdf(pdf_data: Any): ...
|
||||
15
odoo-stubs/tools/profiler.pyi
Normal file
15
odoo-stubs/tools/profiler.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
class _LogTracer:
|
||||
profiles: Any = ...
|
||||
whitelist: Any = ...
|
||||
blacklist: Any = ...
|
||||
files: Any = ...
|
||||
deep: Any = ...
|
||||
first_frame: Any = ...
|
||||
def __init__(self, whitelist: Optional[Any] = ..., blacklist: Optional[Any] = ..., files: Optional[Any] = ..., deep: bool = ...) -> None: ...
|
||||
def tracer(self, frame: Any, event: Any, arg: Any): ...
|
||||
|
||||
def profile(method: Optional[Any] = ..., whitelist: Optional[Any] = ..., blacklist: Any = ..., files: Optional[Any] = ..., minimum_time: int = ..., minimum_queries: int = ...): ...
|
||||
30
odoo-stubs/tools/pycompat.pyi
Normal file
30
odoo-stubs/tools/pycompat.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from collections import namedtuple
|
||||
from typing import Any, Optional
|
||||
|
||||
PY2: Any
|
||||
|
||||
_Writer = namedtuple('_Writer', 'writerow writerows')
|
||||
unichr = unichr
|
||||
text_type = unicode
|
||||
string_types: Any
|
||||
|
||||
def to_native(source: Any, encoding: str = ..., falsy_empty: bool = ...): ...
|
||||
|
||||
integer_types: Any
|
||||
|
||||
def implements_to_string(cls): ...
|
||||
def implements_iterator(cls): ...
|
||||
def csv_reader(stream: Any, **params: Any) -> None: ...
|
||||
def csv_writer(stream: Any, **params: Any): ...
|
||||
unichr = chr
|
||||
text_type = str
|
||||
imap = map
|
||||
izip = zip
|
||||
ifilter = filter
|
||||
|
||||
def reraise(tp: Any, value: Any, tb: Optional[Any] = ...) -> None: ...
|
||||
|
||||
_reader: Any
|
||||
_writer: Any
|
||||
|
||||
def to_text(source: Any): ...
|
||||
26
odoo-stubs/tools/safe_eval.pyi
Normal file
26
odoo-stubs/tools/safe_eval.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
from . import pycompat as pycompat
|
||||
from .misc import ustr as ustr
|
||||
from typing import Any, Optional
|
||||
|
||||
unsafe_eval = eval
|
||||
__all__: Any
|
||||
_ALLOWED_MODULES: Any
|
||||
_UNSAFE_ATTRIBUTES: Any
|
||||
_POSSIBLE_OPCODES_P3: Any
|
||||
_CONST_OPCODES: Any
|
||||
_EXPR_OPCODES: Any
|
||||
_SAFE_OPCODES: Any
|
||||
_logger: Any
|
||||
|
||||
def _get_opcodes(codeobj: Any): ...
|
||||
def assert_no_dunder_name(code_obj: Any, expr: Any) -> None: ...
|
||||
def assert_valid_codeobj(allowed_codes: Any, code_obj: Any, expr: Any) -> None: ...
|
||||
def test_expr(expr: Any, allowed_codes: Any, mode: str = ...): ...
|
||||
def const_eval(expr: Any): ...
|
||||
def expr_eval(expr: Any): ...
|
||||
def _import(name: Any, globals: Optional[Any] = ..., locals: Optional[Any] = ..., fromlist: Optional[Any] = ..., level: int = ...): ...
|
||||
|
||||
_BUILTINS: Any
|
||||
|
||||
def safe_eval(expr: Any, globals_dict: Optional[Any] = ..., locals_dict: Optional[Any] = ..., mode: str = ..., nocopy: bool = ..., locals_builtins: bool = ...): ...
|
||||
def test_python_expr(expr: Any, mode: str = ...): ...
|
||||
29
odoo-stubs/tools/sql.pyi
Normal file
29
odoo-stubs/tools/sql.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
_schema: Any
|
||||
_CONFDELTYPES: Any
|
||||
|
||||
def existing_tables(cr: Any, tablenames: Any): ...
|
||||
def table_exists(cr: Any, tablename: Any): ...
|
||||
def table_kind(cr: Any, tablename: Any): ...
|
||||
def create_model_table(cr: Any, tablename: Any, comment: Optional[Any] = ...) -> None: ...
|
||||
def table_columns(cr: Any, tablename: Any): ...
|
||||
def column_exists(cr: Any, tablename: Any, columnname: Any): ...
|
||||
def create_column(cr: Any, tablename: Any, columnname: Any, columntype: Any, comment: Optional[Any] = ...) -> None: ...
|
||||
def rename_column(cr: Any, tablename: Any, columnname1: Any, columnname2: Any) -> None: ...
|
||||
def convert_column(cr: Any, tablename: Any, columnname: Any, columntype: Any) -> None: ...
|
||||
def set_not_null(cr: Any, tablename: Any, columnname: Any) -> None: ...
|
||||
def drop_not_null(cr: Any, tablename: Any, columnname: Any) -> None: ...
|
||||
def constraint_definition(cr: Any, tablename: Any, constraintname: Any): ...
|
||||
def add_constraint(cr: Any, tablename: Any, constraintname: Any, definition: Any) -> None: ...
|
||||
def drop_constraint(cr: Any, tablename: Any, constraintname: Any) -> None: ...
|
||||
def add_foreign_key(cr: Any, tablename1: Any, columnname1: Any, tablename2: Any, columnname2: Any, ondelete: Any): ...
|
||||
def fix_foreign_key(cr: Any, tablename1: Any, columnname1: Any, tablename2: Any, columnname2: Any, ondelete: Any): ...
|
||||
def index_exists(cr: Any, indexname: Any): ...
|
||||
def create_index(cr: Any, indexname: Any, tablename: Any, expressions: Any) -> None: ...
|
||||
def create_unique_index(cr: Any, indexname: Any, tablename: Any, expressions: Any) -> None: ...
|
||||
def drop_index(cr: Any, indexname: Any, tablename: Any) -> None: ...
|
||||
def drop_view_if_exists(cr: Any, viewname: Any) -> None: ...
|
||||
def escape_psql(to_escape: Any): ...
|
||||
def pg_varchar(size: int = ...): ...
|
||||
def reverse_order(order: Any): ...
|
||||
5
odoo-stubs/tools/test_config.pyi
Normal file
5
odoo-stubs/tools/test_config.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from . import config as config
|
||||
from typing import Any
|
||||
|
||||
config_file_00: Any
|
||||
conf: Any
|
||||
10
odoo-stubs/tools/test_reports.pyi
Normal file
10
odoo-stubs/tools/test_reports.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from . import config as config, pycompat as pycompat, ustr as ustr
|
||||
from .. import api as api
|
||||
from .safe_eval import safe_eval as safe_eval
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
_test_logger: Any
|
||||
|
||||
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] = ...): ...
|
||||
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] = ...): ...
|
||||
78
odoo-stubs/tools/translate.pyi
Normal file
78
odoo-stubs/tools/translate.pyi
Normal file
@@ -0,0 +1,78 @@
|
||||
import csv
|
||||
from . import config as config, pycompat as pycompat
|
||||
from .misc import SKIPPED_ELEMENT_TYPES as SKIPPED_ELEMENT_TYPES, file_open as file_open, get_iso_codes as get_iso_codes
|
||||
from .osutil import walksymlinks as walksymlinks
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
WEB_TRANSLATION_COMMENT: str
|
||||
SKIPPED_ELEMENTS: Any
|
||||
_LOCALE2WIN32: Any
|
||||
ENGLISH_SMALL_WORDS: Any
|
||||
|
||||
class UNIX_LINE_TERMINATOR(csv.excel):
|
||||
lineterminator: str = ...
|
||||
|
||||
def encode(s: Any): ...
|
||||
|
||||
TRANSLATED_ELEMENTS: Any
|
||||
TRANSLATED_ATTRS: Any
|
||||
avoid_pattern: Any
|
||||
node_pattern: Any
|
||||
|
||||
def translate_xml_node(node: Any, callback: Any, parse: Any, serialize: Any): ...
|
||||
def parse_xml(text: Any): ...
|
||||
def serialize_xml(node: Any): ...
|
||||
|
||||
_HTML_PARSER: Any
|
||||
|
||||
def parse_html(text: Any): ...
|
||||
def serialize_html(node: Any): ...
|
||||
def xml_translate(callback: Any, value: Any): ...
|
||||
def html_translate(callback: Any, value: Any): ...
|
||||
def translate(cr: Any, name: Any, source_type: Any, lang: Any, source: Optional[Any] = ...): ...
|
||||
|
||||
class GettextAlias:
|
||||
def _get_db(self): ...
|
||||
def _get_cr(self, frame: Any, allow_create: bool = ...): ...
|
||||
def _get_uid(self, frame: Any): ...
|
||||
def _get_lang(self, frame: Any): ...
|
||||
def __call__(self, source: Any): ...
|
||||
|
||||
_: Any
|
||||
|
||||
def quote(s: Any): ...
|
||||
|
||||
re_escaped_char: Any
|
||||
re_escaped_replacements: Any
|
||||
|
||||
def _sub_replacement(match_obj: Any): ...
|
||||
def unquote(str: Any): ...
|
||||
|
||||
class PoFile:
|
||||
buffer: Any = ...
|
||||
def __init__(self, buffer: Any) -> None: ...
|
||||
lines: Any = ...
|
||||
lines_count: Any = ...
|
||||
first: bool = ...
|
||||
extra_lines: Any = ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def _get_lines(self): ...
|
||||
def cur_line(self): ...
|
||||
def next(self): ...
|
||||
__next__: Any = ...
|
||||
def write_infos(self, modules: Any) -> None: ...
|
||||
def write(self, modules: Any, tnrs: Any, source: Any, trad: Any, comments: Optional[Any] = ...) -> None: ...
|
||||
|
||||
def trans_export(lang: Any, modules: Any, buffer: Any, format: Any, cr: Any) -> None: ...
|
||||
def trans_parse_rml(de: Any): ...
|
||||
def _push(callback: Any, term: Any, source_line: Any) -> None: ...
|
||||
def in_modules(object_name: Any, modules: Any): ...
|
||||
def _extract_translatable_qweb_terms(element: Any, callback: Any) -> None: ...
|
||||
def babel_extract_qweb(fileobj: Any, keywords: Any, comment_tags: Any, options: Any): ...
|
||||
def trans_generate(lang: Any, modules: Any, cr: Any): ...
|
||||
def trans_load(cr: Any, filename: Any, lang: Any, verbose: bool = ..., module_name: Optional[Any] = ..., context: Optional[Any] = ...): ...
|
||||
def trans_load_data(cr: Any, fileobj: Any, fileformat: Any, lang: Any, lang_name: Optional[Any] = ..., verbose: bool = ..., module_name: Optional[Any] = ..., context: Optional[Any] = ...) -> None: ...
|
||||
def get_locales(lang: Optional[Any] = ...) -> None: ...
|
||||
def resetlocale(): ...
|
||||
def load_language(cr: Any, lang: Any) -> None: ...
|
||||
30
odoo-stubs/tools/view_validation.pyi
Normal file
30
odoo-stubs/tools/view_validation.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from odoo import tools as tools
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
_validators: Any
|
||||
_relaxng_cache: Any
|
||||
|
||||
def valid_view(arch: Any): ...
|
||||
def validate(*view_types: Any): ...
|
||||
def relaxng(view_type: Any): ...
|
||||
def schema_valid(arch: Any): ...
|
||||
def valid_page_in_book(arch: Any): ...
|
||||
def valid_field_in_graph(arch: Any): ...
|
||||
def valid_field_in_tree(arch: Any): ...
|
||||
def valid_att_in_field(arch: Any): ...
|
||||
def valid_att_in_label(arch: Any): ...
|
||||
def valid_att_in_form(arch: Any): ...
|
||||
def valid_type_in_colspan(arch: Any): ...
|
||||
def valid_type_in_col(arch: Any): ...
|
||||
def valid_alternative_image_text(arch: Any): ...
|
||||
def valid_simili_button(arch: Any): ...
|
||||
def valid_simili_dropdown(arch: Any): ...
|
||||
def valid_simili_progressbar(arch: Any): ...
|
||||
def valid_dialog(arch: Any): ...
|
||||
def valid_simili_tabpanel(arch: Any): ...
|
||||
def valid_simili_tab(arch: Any): ...
|
||||
def valid_simili_tablist(arch: Any): ...
|
||||
def valid_focusable_button(arch: Any): ...
|
||||
def valid_prohibited_none_role(arch: Any): ...
|
||||
def valid_alerts(arch: Any): ...
|
||||
13
odoo-stubs/tools/which.pyi
Normal file
13
odoo-stubs/tools/which.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
from os import R_OK as R_OK, W_OK as W_OK
|
||||
from os.path import dirname as dirname
|
||||
from typing import Any, Optional
|
||||
|
||||
__docformat__: str
|
||||
__all__: Any
|
||||
ENOENT: int
|
||||
windows: Any
|
||||
seen: Any
|
||||
defpathext: Any
|
||||
|
||||
def which_files(file: Any, mode: Any = ..., path: Optional[Any] = ..., pathext: Optional[Any] = ...) -> None: ...
|
||||
def which(file: Any, mode: Any = ..., path: Optional[Any] = ..., pathext: Optional[Any] = ...): ...
|
||||
3
odoo-stubs/tools/win32.pyi
Normal file
3
odoo-stubs/tools/win32.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
def nl_langinfo(param: Any): ...
|
||||
8
odoo-stubs/tools/xml_utils.pyi
Normal file
8
odoo-stubs/tools/xml_utils.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from odoo.exceptions import UserError as UserError
|
||||
from odoo.tools.misc import file_open as file_open
|
||||
from typing import Any, Optional
|
||||
|
||||
def check_with_xsd(tree_or_str: Any, stream: Any) -> None: ...
|
||||
def _check_with_xsd(tree_or_str: Any, stream: Any) -> None: ...
|
||||
def create_xml_node_chain(first_parent_node: Any, nodes_list: Any, last_node_value: Optional[Any] = ...): ...
|
||||
def create_xml_node(parent_node: Any, node_name: Any, node_value: Optional[Any] = ...): ...
|
||||
Reference in New Issue
Block a user