This commit is contained in:
Trinh Anh Ngoc
2023-05-19 21:16:41 +07:00
parent 12a9154e93
commit 3b029d9de5
48 changed files with 30 additions and 474 deletions

View File

@@ -15,11 +15,7 @@ from . import sql_db as sql_db
from . import tools as tools
from .tools.translate import _ as _
__path__: Any
evented: bool
def gevent_wait_callback(conn, timeout: Any | None = ...) -> None: ...
multi_process: bool
SUPERUSER_ID: int

View File

@@ -2,11 +2,11 @@ from collections import Mapping
from typing import Any, Optional
from weakref import WeakSet
from odoo.addons.base.res.res_users import Users
from .modules.registry import Registry
from .sql_db import Cursor
__all__: Any
_logger: Any
WRAPPED_ATTRS: Any
INHERITED_ATTRS: Any
@@ -14,7 +14,6 @@ class Params:
args: Any
kwargs: Any
def __init__(self, args, kwargs) -> None: ...
def __str__(self): ...
class Meta(type):
def __new__(meta, name, bases, attrs): ...
@@ -54,7 +53,6 @@ class Environment(Mapping):
cr: Cursor
uid: int
context: dict
_local: Any
envs: Environments
@classmethod
def manage(cls) -> None: ...
@@ -62,8 +60,6 @@ class Environment(Mapping):
def reset(cls) -> None: ...
registry: Registry
cache: Cache
_cache_key: Any
_protected: Any
dirty: Any
all: Environments
def __new__(cls, cr: Cursor, uid, context) -> Environment: ...
@@ -82,11 +78,9 @@ class Environment(Mapping):
) -> Environment: ...
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
@property
def user(self):
return self["res.users"]
def user(self) -> "Users": ...
@property
def lang(self) -> str: ...
def _do_in_mode(self, mode) -> None: ...
def do_in_draft(self): ...
@property
def in_draft(self): ...
@@ -119,7 +113,6 @@ class Environments:
def __iter__(self) -> Any: ...
class Cache:
_data: Any
def __init__(self): ...
def contains(self, record, field): ...
def get(self, record, field): ...

View File

@@ -1,7 +1,5 @@
from typing import Any, Optional
_logger: Any
class except_orm(Exception):
name: Any
value: Any

View File

@@ -10,8 +10,6 @@ DATE_LENGTH: Any
DATETIME_LENGTH: Any
EMPTY_DICT: Any
RENAMED_ATTRS: Any
_logger: Any
_schema: Any
Default: Any
def copy_cache(records, env) -> None: ...
@@ -23,8 +21,6 @@ class MetaField(type):
def __new__(meta, name, bases, attrs): ...
def __init__(cls, name, bases, attrs) -> None: ...
_global_seq: Any
class Field(Generic[_FieldValueT], metaclass=MetaField):
type: Any
relational: bool
@@ -32,30 +28,19 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
column_type: Any
column_format: str
column_cast_from: Any
_slots: Any
_sequence: Any
args: Any
_setup_done: Any
def __init__(self, string=..., **kwargs) -> None: ...
def new(self, **kwargs): ...
def __getattr__(self, name): ...
_attrs: Any
def __setattr__(self, name, value) -> None: ...
def set_all_attrs(self, attrs) -> None: ...
def __delattr__(self, name) -> None: ...
def __str__(self): ...
def __repr__(self): ...
def setup_base(self, model, name) -> None: ...
def _can_setup_from(self, field): ...
def _get_attrs(self, model, name): ...
prefetch: bool
string: Any
default: Any
def _setup_attrs(self, model, name): ...
def setup_full(self, model) -> None: ...
def _setup_regular_base(self, model) -> None: ...
depends: Any
def _setup_regular_full(self, model): ...
related: Any
related_field: Any
compute: Any
@@ -63,44 +48,13 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
search: Any
states: Any
required: bool
def _setup_related_full(self, model) -> None: ...
def traverse_related(self, record): ...
def _compute_related(self, records) -> None: ...
def _inverse_related(self, records) -> None: ...
def _search_related(self, records, operator, value): ...
_related_comodel_name: Any
_related_string: Any
_related_help: Any
_related_readonly: Any
_related_groups: Any
_related_group_operator: Any
@property
def base_field(self): ...
def _default_company_dependent(self, model): ...
def _compute_company_dependent(self, records) -> None: ...
def _inverse_company_dependent(self, records) -> None: ...
def _search_company_dependent(self, records, operator, value): ...
def resolve_deps(self, model, path0=..., seen=...): ...
recursive: bool
def setup_triggers(self, model) -> None: ...
def get_description(self, env): ...
_description_store: Any
_description_manual: Any
_description_depends: Any
_description_related: Any
_description_company_dependent: Any
_description_readonly: Any
_description_required: Any
_description_states: Any
_description_groups: Any
_description_change_default: Any
_description_deprecated: Any
@property
def _description_searchable(self): ...
@property
def _description_sortable(self): ...
def _description_string(self, env): ...
def _description_help(self, env): ...
def null(self, record): ...
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
@@ -121,7 +75,6 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
@overload
def __get__(self: _FieldT, record: None, owner) -> _FieldT: ...
def __set__(self, record, value) -> None: ...
def _compute_value(self, records) -> None: ...
def compute_value(self, records) -> None: ...
def determine_value(self, record) -> None: ...
def determine_draft_value(self, record): ...
@@ -139,26 +92,19 @@ class Boolean(Field[bool]):
class Integer(Field[int]):
type: str
column_type: Any
_slots: Any
_description_group_operator: Any
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
def _update(self, records, value) -> None: ...
def convert_to_export(self, value, record): ...
class Float(Field[float]):
type: str
column_cast_from: Any
_slots: Any
def __init__(self, string=..., digits=..., **kwargs) -> None: ...
@property
def column_type(self): ...
@property
def digits(self): ...
_related__digits: Any
_description_digits: Any
_description_group_operator: Any
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_export(self, value, record): ...
@@ -167,25 +113,16 @@ class Monetary(Field[float]):
type: str
column_type: Any
column_cast_from: Any
_slots: Any
def __init__(self, string=..., currency_field=..., **kwargs) -> None: ...
_related_currency_field: Any
_description_currency_field: Any
_description_group_operator: Any
currency_field: str
def _setup_regular_full(self, model) -> None: ...
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
def convert_to_write(self, value, record): ...
class _String(Field[str]):
_slots: Any
def __init__(self, string=..., **kwargs) -> None: ...
prefetch: Any
def _setup_attrs(self, model, name) -> None: ...
_related_translate: Any
def _description_translate(self, env): ...
def get_trans_terms(self, value): ...
def get_trans_func(self, records): ...
def check_trans_value(self, value): ...
@@ -193,13 +130,9 @@ class _String(Field[str]):
class Char(_String):
type: str
column_cast_from: Any
_slots: Any
@property
def column_type(self): ...
def update_db_column(self, model, column) -> None: ...
_related_size: Any
_description_size: Any
def _setup_regular_base(self, model) -> None: ...
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
@@ -212,20 +145,6 @@ class Text(_String):
class Html(_String):
type: str
column_type: Any
_slots: Any
def _get_attrs(self, model, name): ...
_related_sanitize: Any
_related_sanitize_tags: Any
_related_sanitize_attributes: Any
_related_sanitize_style: Any
_related_strip_style: Any
_related_strip_classes: Any
_description_sanitize: Any
_description_sanitize_tags: Any
_description_sanitize_attributes: Any
_description_sanitize_style: Any
_description_strip_style: Any
_description_strip_classes: Any
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
@@ -262,15 +181,10 @@ class Datetime(Field[datetime.datetime]):
def convert_to_export(self, value, record): ...
def convert_to_display_name(self, value, record): ...
_BINARY = memoryview
class Binary(Field[bytes]):
type: str
_slots: Any
@property
def column_type(self): ...
def _get_attrs(self, model, name): ...
_description_attachment: Any
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def read(self, records) -> None: ...
@@ -278,15 +192,10 @@ class Binary(Field[bytes]):
class Selection(Field[str]):
type: str
_slots: Any
def __init__(self, selection=..., string=..., **kwargs) -> None: ...
@property
def column_type(self): ...
def _setup_regular_base(self, model) -> None: ...
selection: Any
def _setup_related_full(self, model): ...
def _setup_attrs(self, model, name) -> None: ...
def _description_selection(self, env): ...
def get_values(self, env): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_export(self, value, record): ...
@@ -303,29 +212,18 @@ class Reference(Selection):
class _Relational(Field[BaseModel]):
relational: bool
_slots: Any
comodel_name: str
def _setup_regular_base(self, model) -> None: ...
@property
def _related_domain(self): ...
_related_context: Any
_description_relation: Any
_description_context: Any
def _description_domain(self, env): ...
def null(self, record): ...
class Many2one(_Relational):
type: str
column_type: Any
_slots: Any
def __init__(self, comodel_name=..., string=..., **kwargs) -> None: ...
delegate: Any
def _setup_attrs(self, model, name) -> None: ...
ondelete: Any
def update_db(self, model, columns): ...
def update_db_column(self, model, column) -> None: ...
def update_db_foreign_key(self, model, column) -> None: ...
def _update(self, records, value) -> None: ...
def convert_to_column(self, value, record, values: Optional[Any] = ...): ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_record(self, value, record): ...
@@ -343,8 +241,6 @@ class _RelationalMultiUpdate:
def __call__(self): ...
class _RelationalMulti(_Relational):
_slots: Any
def _update(self, records, value) -> None: ...
def convert_to_cache(self, value, record, validate: bool = ...): ...
def convert_to_record(self, value, record): ...
def convert_to_read(self, value, record, use_name_get: bool = ...): ...
@@ -352,17 +248,12 @@ class _RelationalMulti(_Relational):
def convert_to_onchange(self, value, record, names): ...
def convert_to_export(self, value, record): ...
def convert_to_display_name(self, value, record) -> None: ...
def _compute_related(self, records): ...
def _setup_regular_full(self, model) -> None: ...
class One2many(_RelationalMulti):
type: str
_slots: Any
def __init__(
self, comodel_name=..., inverse_name=..., string=..., **kwargs
) -> None: ...
def _setup_regular_full(self, model) -> None: ...
_description_relation_field: Any
def convert_to_onchange(self, value, record, names): ...
def update_db(self, model, columns) -> None: ...
def read(self, records): ...
@@ -370,7 +261,6 @@ class One2many(_RelationalMulti):
class Many2many(_RelationalMulti):
type: str
_slots: Any
def __init__(
self,
comodel_name=...,
@@ -383,8 +273,6 @@ class Many2many(_RelationalMulti):
relation: Any
column1: Any
column2: Any
def _setup_regular_base(self, model) -> None: ...
def _setup_regular_full(self, model) -> None: ...
def update_db(self, model, columns): ...
def update_db_foreign_keys(self, model) -> None: ...
def read(self, records) -> None: ...
@@ -393,6 +281,5 @@ class Many2many(_RelationalMulti):
class Id(Field[int]):
type: str
column_type: Any
_slots: Any
def update_db(self, model, columns) -> None: ...
def __set__(self, record, value) -> None: ...

View File

@@ -2,15 +2,14 @@ from typing import Any, Optional, Union
import werkzeug.contrib.sessions
import werkzeug.wsgi
from odoo.addons.website.models.website import Website
from .api import Environment
from .sql_db import Cursor
_logger: Any
rpc_request: Any
rpc_response: Any
STATIC_CACHE: Any
_request_stack: Any
request: Union[HttpRequest, JsonRequest]
def replace_request_password(args): ...
@@ -34,12 +33,7 @@ class WebRequest:
endpoint: Any
endpoint_arguments: Any
auth_method: Any
website = Environment()["website"]
_cr: Cursor
_uid: int
_context: dict
_env: Environment
_failed: Any
website: "Website"
def __init__(self, httprequest) -> None: ...
@property
def cr(self) -> Cursor: ...
@@ -60,8 +54,6 @@ class WebRequest:
def __enter__(self): ...
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
def set_handler(self, endpoint, arguments, auth) -> None: ...
def _handle_exception(self, exception) -> None: ...
def _call_function(self, *args, **kwargs): ...
@property
def debug(self): ...
def registry_cr(self) -> None: ...
@@ -76,26 +68,19 @@ class WebRequest:
def route(route: Optional[Any] = ..., **kw): ...
class JsonRequest(WebRequest):
_request_type: str
jsonp_handler: Any
params: Any
jsonp: Any
jsonrequest: Any
context: Any
def __init__(self, *args): ...
def _json_response(
self, result: Optional[Any] = ..., error: Optional[Any] = ...
): ...
def _handle_exception(self, exception): ...
def dispatch(self): ...
def serialize_exception(e): ...
class HttpRequest(WebRequest):
_request_type: str
params: Any
def __init__(self, *args) -> None: ...
def _handle_exception(self, exception): ...
def dispatch(self): ...
def make_response(
self, data, headers: Optional[Any] = ..., cookies: Optional[Any] = ...
@@ -149,10 +134,8 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
): ...
def check_security(self) -> None: ...
def logout(self, keep_db: bool = ...) -> None: ...
def _default_values(self) -> None: ...
context: Any
def get_context(self): ...
def _fix_lang(self, context) -> None: ...
def save_action(self, action): ...
def get_action(self, key): ...
def save_request_data(self) -> None: ...
@@ -183,7 +166,6 @@ class DisableCacheMiddleware:
def __call__(self, environ, start_response): ...
class Root:
_loaded: bool
def __init__(self) -> None: ...
def session_store(self): ...
def nodb_routing_map(self): ...

View File

@@ -8,9 +8,6 @@ from .sql_db import Cursor
_ModelT = TypeVar("_ModelT", bound=BaseModel)
_logger: Any
_schema: Any
_unlink: Any
regex_order: Any
regex_object_name: Any
regex_pg_name: Any
@@ -29,10 +26,7 @@ def fix_import_export_id_paths(fieldname): ...
class MetaModel(api.Meta):
module_to_models: Any
_register: bool
_module: Any
def __init__(self, name, bases, attrs) -> None: ...
def _get_addon_name(self, full_name): ...
class NewId:
ref: Any
@@ -384,7 +378,6 @@ class BaseModel(metaclass=MetaModel):
def onchange(self, values, field_name, field_onchange): ...
class RecordCache(MutableMapping):
_record: Any
def __init__(self, record) -> None: ...
def __contains__(self, name): ...
def __getitem__(self, name): ...
@@ -414,8 +407,5 @@ class TransientModel(Model):
def itemgetter_tuple(items): ...
def convert_pgerror_not_null(model, fields, info, e): ...
def convert_pgerror_unique(model, fields, info, e): ...
def _get_translated_field_name(model, field_name): ...
PGERROR_TO_OE: Any
def _normalize_ids(arg, atoms=...): ...

View File

@@ -1,21 +1,20 @@
from odoo.modules.loading import load_modules as load_modules
from odoo.modules.loading import reset_modules_state as reset_modules_state
from odoo.modules.module import adapt_version as adapt_version
from odoo.modules.module import get_module_path as get_module_path
from odoo.modules.module import get_module_resource as get_module_resource
from odoo.modules.module import get_modules as get_modules
from odoo.modules.module import get_modules_with_version as get_modules_with_version
from odoo.modules.module import get_resource_from_path as get_resource_from_path
from odoo.modules.module import get_resource_path as get_resource_path
from odoo.modules.module import initialize_sys_path as initialize_sys_path
from odoo.modules.module import (
load_information_from_description_file as load_information_from_description_file,
)
from odoo.modules.module import load_openerp_module as load_openerp_module
from . import db as db
from . import graph as graph
from . import loading as loading
from . import migration as migration
from . import module as module
from . import registry as registry
from .loading import load_modules as load_modules
from .loading import reset_modules_state as reset_modules_state
from .module import adapt_version as adapt_version
from .module import get_module_path as get_module_path
from .module import get_module_resource as get_module_resource
from .module import get_modules as get_modules
from .module import get_modules_with_version as get_modules_with_version
from .module import get_resource_from_path as get_resource_from_path
from .module import get_resource_path as get_resource_path
from .module import initialize_sys_path as initialize_sys_path
from .module import (
load_information_from_description_file as load_information_from_description_file,
)
from .module import load_openerp_module as load_openerp_module

View File

@@ -1,7 +1,3 @@
from typing import Any
_logger: Any
def is_initialized(cr): ...
def initialize(cr) -> None: ...
def create_categories(cr, categories): ...

View File

@@ -1,14 +1,11 @@
from typing import Any, Optional
_logger: Any
class Graph(dict):
def add_node(self, name, info): ...
def update_from_db(self, cr) -> None: ...
def add_module(self, cr, module, force: Optional[Any] = ...) -> None: ...
def add_modules(self, cr, module_list, force: Optional[Any] = ...): ...
def __iter__(self) -> Any: ...
def __str__(self): ...
class Node:
def __new__(cls, name, graph, info): ...
@@ -23,5 +20,3 @@ class Node:
def add_child(self, name, info): ...
def __setattr__(self, name, value) -> None: ...
def __iter__(self) -> Any: ...
def __str__(self): ...
def _pprint(self, depth: int = ...): ...

View File

@@ -1,8 +1,5 @@
from typing import Any, Optional
_logger: Any
_test_logger: Any
def load_module_graph(
cr,
graph,
@@ -12,7 +9,6 @@ def load_module_graph(
report: Optional[Any] = ...,
models_to_check: Optional[Any] = ...,
): ...
def _check_module_names(cr, module_names) -> None: ...
def load_marked_modules(
cr,
graph,

View File

@@ -2,12 +2,9 @@ from typing import Any
def load_script(path, module_name): ...
_logger: Any
class MigrationManager:
cr: Any
graph: Any
migrations: Any
def __init__(self, cr, graph) -> None: ...
def _get_files(self): ...
def migrate_module(self, pkg, stage): ...

View File

@@ -1,12 +1,11 @@
from operator import itemgetter as itemgetter
from typing import Any, Optional
from odoo import SUPERUSER_ID as SUPERUSER_ID
from odoo import api as api
from .. import SUPERUSER_ID as SUPERUSER_ID
from .. import api as api
MANIFEST_NAMES: Any
README: Any
_logger: Any
ad_paths: Any
hooked: bool
loaded: Any

View File

@@ -2,14 +2,10 @@ from collections import Mapping
from collections import defaultdict as defaultdict
from typing import Any, Optional
from odoo.sql_db import Cursor
from odoo.tools import table_exists as table_exists
_logger: Any
from ..sql_db import Cursor
from ..tools import table_exists as table_exists
class Registry(Mapping):
_lock: Any
_saved_lock: Any
model_cache: Any
def registries(cls): ...
def __new__(cls, db_name): ...
@@ -22,17 +18,8 @@ class Registry(Mapping):
update_module: bool = ...,
): ...
models: Any
_sql_error: Any
_init: bool
_init_parent: Any
_assertion_report: Any
_fields_by_model: Any
_post_init_queue: Any
_notnull_errors: Any
_init_modules: Any
updated_modules: Any
db_name: Any
_db: Any
test_cr: Any
loaded: bool
ready: bool
@@ -55,13 +42,11 @@ class Registry(Mapping):
def do_parent_store(self, cr) -> None: ...
def descendants(self, model_names, *kinds): ...
def load(self, cr, module): ...
_m2m: Any
def setup_models(self, cr) -> None: ...
def post_init(self, func, *args, **kwargs) -> None: ...
def init_models(self, cr, model_names, context) -> None: ...
def check_tables_exist(self, cr) -> None: ...
def cache(self): ...
def _clear_cache(self) -> None: ...
def clear_caches(self) -> None: ...
def setup_signaling(self) -> None: ...
def check_signaling(self): ...

View File

@@ -1,8 +1,6 @@
import logging.handlers
from typing import Any, Optional
_logger: Any
def log(logger, level, prefix, msg, depth: Optional[Any] = ...) -> None: ...
class PostgreSQLHandler(logging.Handler):
@@ -30,8 +28,6 @@ class DBFormatter(logging.Formatter):
class ColoredFormatter(DBFormatter):
def format(self, record): ...
_logger_init: bool
def init_logger(): ...
DEFAULT_LOG_CONFIGURATION: Any

View File

@@ -15,7 +15,6 @@ TRUE_LEAF: Any
FALSE_LEAF: Any
TRUE_DOMAIN: Any
FALSE_DOMAIN: Any
_logger: Any
def normalize_domain(domain): ...
def is_false(model, domain): ...
@@ -23,7 +22,6 @@ def combine(operator, unit, zero, domains): ...
def AND(domains): ...
def OR(domains): ...
def distribute_not(domain): ...
def _quote(to_quote): ...
def generate_table_alias(src_table_alias, joined_tables=...): ...
def get_alias_from_query(from_query): ...
def normalize_leaf(element): ...
@@ -39,16 +37,13 @@ class ExtendedLeaf:
join_context: Any
leaf: Any
model: Any
_models: Any
def __init__(
self, leaf, model, join_context: Optional[Any] = ..., internal: bool = ...
) -> None: ...
def __str__(self): ...
def generate_alias(self): ...
def add_join_context(self, model, lhs_col, table_col, link) -> 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): ...
@@ -61,7 +56,6 @@ def create_substitution_leaf(
): ...
class expression:
_unaccent: Any
joins: Any
root_model: Any
expression: Any
@@ -70,5 +64,4 @@ class expression:
result: Any
stack: Any
def parse(self): ...
def __leaf_to_sql(self, eleaf): ...
def to_sql(self): ...

View File

@@ -1,7 +1,5 @@
from typing import Any, Optional
def _quote(to_quote): ...
class Query:
tables: Any
where_clause: Any
@@ -16,8 +14,6 @@ class Query:
joins: Optional[Any] = ...,
extras: Optional[Any] = ...,
) -> None: ...
def _get_table_aliases(self): ...
def _get_alias_mapping(self): ...
def add_join(
self,
connection,
@@ -27,4 +23,3 @@ class Query:
extra_params=...,
): ...
def get_sql(self): ...
def __str__(self): ...

View File

@@ -1,6 +1,5 @@
from typing import Any, Optional
_logger: Any
RPC_VERSION_1: Any
def exp_login(db, login, password): ...

View File

@@ -1,22 +1,10 @@
from functools import wraps as wraps
from typing import Any, Optional
_logger: Any
class DatabaseExists(Warning): ...
def check_db_management_enabled(method): ...
def check_super(passwd): ...
def _initialize_db(
id,
db_name,
demo,
lang,
user_password,
login: str = ...,
country_code: Optional[Any] = ...,
) -> None: ...
def _create_empty_database(name) -> None: ...
def exp_create_database(
db_name,
demo,
@@ -26,7 +14,6 @@ def exp_create_database(
country_code: Optional[Any] = ...,
): ...
def exp_duplicate_database(db_original_name, db_name): ...
def _drop_conn(cr, db_name) -> None: ...
def exp_drop(db_name): ...
def exp_dump(db_name, format): ...
def dump_db_manifest(cr): ...

View File

@@ -1,6 +1,5 @@
from typing import Any, Optional
_logger: Any
PG_CONCURRENCY_ERRORS_TO_RETRY: Any
MAX_TRIES_ON_CONCURRENCY_FAILURE: int

View File

@@ -3,7 +3,6 @@ from typing import Any, Optional
import werkzeug.serving
INOTIFY_LISTEN_EVENTS: Any
_logger: Any
SLEEP_INTERVAL: int
def memory_info(process): ...
@@ -29,7 +28,6 @@ class ThreadedWSGIServerReloadable(
socket: Any
def server_bind(self) -> None: ...
def server_activate(self) -> None: ...
def _handle_request_noblock(self) -> None: ...
def shutdown_request(self, request) -> None: ...
class FSWatcherBase:
@@ -141,7 +139,6 @@ class Worker:
def start(self) -> None: ...
def stop(self) -> None: ...
def run(self) -> None: ...
def _runloop(self) -> None: ...
class WorkerHTTP(Worker):
sock_timeout: Any
@@ -156,14 +153,12 @@ class WorkerCron(Worker):
watchdog_timeout: Any
def __init__(self, multi) -> 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_yml(registry, test_file) -> None: ...
def load_test_file_py(registry, test_file) -> None: ...
def preload_registries(dbnames): ...

View File

@@ -1,6 +1,5 @@
from typing import Any
_logger: Any
RPC_FAULT_CODE_CLIENT_ERROR: int
RPC_FAULT_CODE_APPLICATION_ERROR: int
RPC_FAULT_CODE_WARNING: int
@@ -9,7 +8,6 @@ RPC_FAULT_CODE_ACCESS_ERROR: int
def xmlrpc_handle_exception_int(e): ...
def xmlrpc_handle_exception_string(e): ...
def _patch_xmlrpc_marshaller() -> None: ...
def wsgi_xmlrpc(environ, start_response): ...
def application_unproxied(environ, start_response): ...

View File

@@ -2,7 +2,6 @@ from typing import Any, Optional
import psycopg2.extensions
_logger: Any
types_mapping: Any
def unbuffer(symb, cr): ...
@@ -20,19 +19,9 @@ class Cursor:
sql_into_log: Any
sql_log: Any
sql_log_count: int
_closed: bool
__pool: Any
dbname: Any
_serialized: Any
_cnx: Any
_obj: Any
__caller: Any
__closer: bool
_default_log_exceptions: bool
cache: Any
_event_handlers: Any
def __init__(self, pool, dbname, dsn, serialized: bool = ...) -> None: ...
def __build_dict(self, row): ...
def dictfetchone(self): ...
def dictfetchmany(self, size): ...
def dictfetchall(self): ...
@@ -43,10 +32,8 @@ class Cursor:
def split_for_in_conditions(self, ids, size: Optional[Any] = ...): ...
def print_log(self): ...
def close(self): ...
def _close(self, leak: bool = ...) -> None: ...
def autocommit(self, on) -> None: ...
def after(self, event, func) -> None: ...
def _pop_event_handlers(self): ...
def commit(self): ...
def rollback(self): ...
def __enter__(self): ...
@@ -57,7 +44,6 @@ class Cursor:
def closed(self): ...
class TestCursor(Cursor):
_lock: Any
def __init__(self, *args, **kwargs) -> None: ...
def acquire(self) -> None: ...
def release(self) -> None: ...
@@ -68,9 +54,6 @@ class TestCursor(Cursor):
def rollback(self) -> None: ...
class LazyCursor:
_dbname: Any
_cursor: Any
_depth: int
def __init__(self, dbname: Optional[Any] = ...) -> None: ...
@property
def dbname(self): ...
@@ -82,12 +65,7 @@ class PsycoConnection(psycopg2.extensions.connection): ...
class ConnectionPool:
def locked(fun): ...
_connections: Any
_maxconn: Any
_lock: Any
def __init__(self, maxconn: int = ...) -> None: ...
def __repr__(self): ...
def _debug(self, msg, *args) -> None: ...
def borrow(self, connection_info): ...
def give_back(self, connection, keep_in_pool: bool = ...) -> None: ...
def close_all(self, dsn: Optional[Any] = ...) -> None: ...
@@ -95,7 +73,6 @@ class ConnectionPool:
class Connection:
dbname: Any
dsn: Any
__pool: Any
def __init__(self, pool, dbname, dsn) -> None: ...
def cursor(self, serialized: bool = ...): ...
def test_cursor(self, serialized: bool = ...): ...
@@ -104,9 +81,6 @@ class Connection:
__nonzero__: Any
def connection_info_for(db_or_uri): ...
_Pool: Any
def db_connect(to, allow_uri: bool = ...): ...
def close_db(db_name) -> None: ...
def close_all() -> None: ...

View File

@@ -5,7 +5,6 @@ from ..api import Environment
from ..modules.registry import Registry
from ..sql_db import Cursor
_logger: Any
ADDONS_PATH: Any
HOST: str
PORT: Any
@@ -34,7 +33,6 @@ class BaseCase(TreeCase):
def uid(self, user) -> None: ...
def ref(self, xid): ...
def browse_ref(self, xid): ...
def _assertRaises(self, exception) -> None: ...
def assertRaises(self, exception, func: Optional[Any] = ..., *args, **kwargs): ...
def shortDescription(self): ...
def assertItemsEqual(self, a, b, msg: Optional[Any] = ...) -> None: ...
@@ -53,7 +51,6 @@ class SingleTransactionCase(BaseCase):
savepoint_seq: Any
class SavepointCase(SingleTransactionCase):
_savepoint_id: Any
def setUp(self) -> None: ...
def tearDown(self) -> None: ...
@@ -72,7 +69,6 @@ class HttpCase(TransactionCase):
def authenticate(self, user, password) -> None: ...
def phantom_poll(self, phantom, timeout): ...
def phantom_run(self, cmd, timeout) -> None: ...
def _wait_remaining_requests(self) -> None: ...
def phantom_js(
self,
url_path,

View File

@@ -1,7 +1,6 @@
from typing import Any, Optional
__version_info__: Any
__version__: Any
def user_data_dir(
appname: Optional[Any] = ...,
@@ -66,7 +65,3 @@ class AppDirs:
def user_cache_dir(self): ...
@property
def user_log_dir(self): ...
def _get_win_folder_from_registry(csidl_name): ...
def _get_win_folder_with_pywin32(csidl_name): ...
def _get_win_folder_with_ctypes(csidl_name): ...

View File

@@ -5,4 +5,3 @@ class assertion_report:
def record_success(self) -> None: ...
def record_failure(self) -> None: ...
def record_result(self, result) -> None: ...
def __str__(self): ...

View File

@@ -1,7 +1,6 @@
from typing import Any, Optional
unsafe_eval = eval
_logger: Any
class ormcache_counter:
hit: int

View File

@@ -9,23 +9,16 @@ class MyOption(optparse.Option):
DEFAULT_LOG_HANDLER: str
def _get_default_datadir(): ...
def _deduplicate_loggers(loggers): ...
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): ...
def _check_addons_path(self, option, opt, value, parser) -> None: ...
def load(self) -> None: ...
def save(self) -> None: ...
def get(self, key, default: Optional[Any] = ...): ...

View File

@@ -1,6 +1,5 @@
from typing import Any, Optional
_logger: Any
safe_eval: Any
class ParseError(Exception):
@@ -9,16 +8,12 @@ class ParseError(Exception):
filename: Any
lineno: Any
def __init__(self, msg, text, filename, lineno) -> None: ...
def __str__(self): ...
class RecordDictWrapper(dict):
record: Any
def __init__(self, record) -> None: ...
def __getitem__(self, key): ...
def _get_idref(self, env, model_str, idref): ...
def _fix_multiple_roots(node) -> None: ...
def _eval_xml(self, node, env): ...
def str2bool(value): ...
class xml_import:
@@ -27,32 +22,6 @@ class xml_import:
def isnoupdate(self, data_node: Optional[Any] = ...): ...
def get_context(self, data_node, node, eval_dict): ...
def get_uid(self, data_node, node): ...
def _test_xml_id(self, xml_id) -> None: ...
def _tag_delete(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
) -> None: ...
def _tag_report(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
): ...
def _tag_function(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
) -> None: ...
def _tag_act_window(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
) -> None: ...
def _tag_menuitem(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
): ...
def _assert_equals(self, f1, f2, prec: int = ...): ...
def _tag_assert(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
) -> None: ...
def _tag_record(
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
): ...
def _tag_template(
self, el, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
): ...
def id_get(self, id_str, raise_if_not_found: bool = ...): ...
def model_id_get(self, id_str, raise_if_not_found: bool = ...): ...
def parse(self, de, mode: Optional[Any] = ...): ...
@@ -65,7 +34,6 @@ class xml_import:
assertion_report: Any
noupdate: Any
xml_filename: Any
_tags: Any
def __init__(
self,
cr,

View File

@@ -1,6 +1,5 @@
from typing import Any
_logger: Any
SUPPORTED_DEBUGGER: Any
def post_mortem(config, info) -> None: ...

View File

@@ -1,9 +1,6 @@
from typing import Any, Optional
def round(f): ...
def _float_check_precision(
precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...
): ...
def float_round(
value,
precision_digits: Optional[Any] = ...,
@@ -22,8 +19,5 @@ def float_compare(
precision_rounding: Optional[Any] = ...,
): ...
def float_repr(value, precision_digits): ...
_float_repr = float_repr
def float_split_str(value, precision_digits): ...
def float_split(value, precision_digits): ...

View File

@@ -51,7 +51,6 @@ class graph:
tree_list: Any
start: Any
def process(self, starting_node) -> None: ...
def __str__(self): ...
def scale(
self, maxx, maxy, nwidth: int = ..., nheight: int = ..., margin: int = ...
) -> None: ...

View File

@@ -7,7 +7,6 @@ class LRUNode:
def __init__(self, prev, me) -> None: ...
class LRU:
_lock: Any
count: Any
d: Any
first: Any

View File

@@ -1,23 +1,10 @@
from typing import Any, Optional
from lxml.html import clean
_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) -> None: ...
def tag_quote(self, el): ...
def strip_class(self, el) -> None: ...
def parse_style(self, el) -> None: ...
def html_sanitize(
src,
silent: bool = ...,

View File

@@ -1,8 +1 @@
from collections import namedtuple
from typing import Any
_Entry = namedtuple("_Entry", ["mimetype", "signatures", "discriminants"])
def guess_mimetype(bin_data, default: str = ...): ...
guess_mimetype: Any

View File

@@ -1,27 +1,24 @@
import pickle as pickle_
from collections import Mapping, MutableMapping, MutableSet, defaultdict
from collections import Mapping, MutableSet
from itertools import repeat as repeat
from typing import Any, Optional
import xlsxwriter
import xlwt
from odoo.loglevels import exception_to_unicode as exception_to_unicode
from odoo.loglevels import get_encodings as get_encodings
from ..loglevels import exception_to_unicode as exception_to_unicode
from ..loglevels import get_encodings as get_encodings
from .cache import *
_logger: Any
SKIPPED_ELEMENT_TYPES: Any
def find_in_path(name): ...
def _exec_pipe(prog, args, env: Optional[Any] = ...): ...
def exec_command_pipe(name, *args): ...
def find_pg_tool(name): ...
def exec_pg_environ(): ...
def exec_pg_command(name, *args) -> None: ...
def exec_pg_command_pipe(name, *args): ...
def file_open(name, mode: str = ..., subdir: str = ..., pathinfo: bool = ...): ...
def _fileopen(path, mode, basedir, pathinfo, basename: Optional[Any] = ...): ...
def flatten(list): ...
def reverse_enumerate(l): ...
def partition(pred, elems): ...
@@ -63,8 +60,7 @@ def get_and_group_by_company(cr, uid, obj, ids, context: Optional[Any] = ...): .
def resolve_attr(obj, attr): ...
def attrgetter(*items): ...
class unquote(str):
def __repr__(self): ...
class unquote(str): ...
class UnquoteEvalContext(defaultdict):
def __init__(self, *args, **kwargs) -> None: ...
@@ -83,8 +79,6 @@ class mute_logger:
) -> None: ...
def __call__(self, func): ...
_ph: Any
class CountingStream:
stream: Any
index: Any
@@ -97,7 +91,6 @@ class CountingStream:
def stripped_sys_argv(*strip_args): ...
class ConstantMapping(Mapping):
_value: Any
def __init__(self, val) -> None: ...
def __len__(self): ...
def __iter__(self) -> Any: ...
@@ -117,7 +110,6 @@ class frozendict(dict):
def __hash__(self) -> Any: ...
class Collector(Mapping):
_map: Any
def __init__(self) -> None: ...
def add(self, key, val) -> None: ...
def __getitem__(self, key): ...
@@ -125,7 +117,6 @@ class Collector(Mapping):
def __len__(self): ...
class OrderedSet(MutableSet):
_map: Any
def __init__(self, elems=...) -> None: ...
def __contains__(self, elem): ...
def __iter__(self) -> Any: ...
@@ -160,7 +151,6 @@ def formatLang(
currency_obj: bool = ...,
): ...
def format_date(env, value, lang_code: str = ..., date_format: bool = ...): ...
def _consteq(str1, str2): ...
consteq: Any
@@ -168,15 +158,9 @@ class Unpickler(pickle_.Unpickler):
find_global: Any
find_class: Any
def _pickle_load(stream, encoding: str = ..., errors: bool = ...): ...
pickle: Any
def wrap_values(d): ...
_missing: Any
_cache: Any
def wrap_module(module, attr_list): ...
mods: Any

View File

@@ -1,8 +1,7 @@
import ctypes
import os
from typing import Any, Optional
from odoo.release import nt_service_name as nt_service_name
from ..release import nt_service_name as nt_service_name
def listdir(dir, recursive: bool = ...): ...
def walksymlinks(top, topdown: bool = ..., onerror: Optional[Any] = ...) -> None: ...
@@ -13,7 +12,3 @@ def zip_dir(
getppid = os.getppid
is_running_as_nt_service: Any
_TH32CS_SNAPPROCESS: int
class _PROCESSENTRY32(ctypes.Structure):
_fields_: Any

View File

@@ -3,5 +3,4 @@ from typing import Any
component_re: Any
replace: Any
def _parse_version_parts(s) -> None: ...
def parse_version(s): ...

View File

@@ -1,23 +1,5 @@
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, event, arg): ...
def profile(
method: Optional[Any] = ...,
whitelist: Optional[Any] = ...,

View File

@@ -1,9 +1,6 @@
from collections import namedtuple
from typing import Any, Optional
PY2: Any
_Writer = namedtuple("_Writer", "writerow writerows")
unichr = chr
text_type = str
string_types: Any
@@ -18,10 +15,6 @@ ifilter = filter
def implements_to_string(cls): ...
def implements_iterator(cls): ...
def reraise(tp, value, tb: Optional[Any] = ...) -> None: ...
_reader: Any
_writer: Any
def csv_reader(stream, **params): ...
def csv_writer(stream, **params): ...
def to_text(source): ...

View File

@@ -1,8 +1,5 @@
from typing import Any, Optional
_schema: Any
_CONFDELTYPES: Any
def existing_tables(cr, tablenames): ...
def table_exists(cr, tablename): ...
def table_kind(cr, tablename): ...

View File

@@ -1,4 +0,0 @@
from typing import Any
config_file_00: Any
conf: Any

View File

@@ -2,9 +2,6 @@ from typing import Any, Optional
from . import config as config
_logger: Any
_test_logger: Any
def try_report(
cr,
uid,

View File

@@ -1,10 +1,8 @@
import csv
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):
@@ -20,9 +18,6 @@ node_pattern: Any
def translate_xml_node(node, callback, parse, serialize): ...
def parse_xml(text): ...
def serialize_xml(node): ...
_HTML_PARSER: Any
def parse_html(text): ...
def serialize_html(node): ...
def xml_translate(callback, value): ...
@@ -30,10 +25,6 @@ def html_translate(callback, value): ...
def translate(cr, name, source_type, lang, source: Optional[Any] = ...): ...
class GettextAlias:
def _get_db(self): ...
def _get_cr(self, frame, allow_create: bool = ...): ...
def _get_uid(self, frame): ...
def _get_lang(self, frame): ...
def __call__(self, source): ...
_: Any
@@ -43,7 +34,6 @@ def quote(s): ...
re_escaped_char: Any
re_escaped_replacements: Any
def _sub_replacement(match_obj): ...
def unquote(str): ...
class PoFile:
@@ -54,7 +44,6 @@ class PoFile:
first: bool
extra_lines: Any
def __iter__(self) -> Any: ...
def _get_lines(self): ...
def cur_line(self): ...
def next(self): ...
__next__: Any
@@ -65,9 +54,7 @@ class PoFile:
def trans_export(lang, modules, buffer, format, cr) -> None: ...
def trans_parse_rml(de): ...
def _push(callback, term, source_line) -> None: ...
def in_modules(object_name, modules): ...
def _extract_translatable_qweb_terms(element, callback) -> None: ...
def babel_extract_qweb(fileobj, keywords, comment_tags, options): ...
def trans_generate(lang, modules, cr): ...
def trans_load(

View File

@@ -1,9 +1,3 @@
from typing import Any
_logger: Any
_validators: Any
_relaxng_cache: Any
def valid_view(arch): ...
def validate(*view_types): ...
def relaxng(view_type): ...

View File

@@ -3,8 +3,6 @@ from os import 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

View File

@@ -1,9 +1,8 @@
from typing import Any, Optional
from odoo.tools.misc import file_open as file_open
from .misc import file_open as file_open
def check_with_xsd(tree_or_str, stream) -> None: ...
def _check_with_xsd(tree_or_str, stream) -> None: ...
def create_xml_node_chain(
first_parent_node, nodes_list, last_node_value: Optional[Any] = ...
): ...

View File

@@ -1,7 +1,6 @@
from typing import Any, Optional
from odoo import SUPERUSER_ID as SUPERUSER_ID
from .. import SUPERUSER_ID as SUPERUSER_ID
from . import assertion_report as assertion_report
from . import pycompat as pycompat
from . import yaml_tag as yaml_tag
@@ -12,12 +11,10 @@ from .misc import file_open as file_open
from .safe_eval import safe_eval as safe_eval
unsafe_eval = eval
_logger: Any
class YamlImportException(Exception): ...
class YamlImportAbortion(Exception): ...
def _is_yaml_mapping(node, tag_constructor): ...
def is_comment(node): ...
def is_assert(node): ...
def is_record(node): ...
@@ -63,47 +60,20 @@ class YamlInterpreter:
noupdate: bool = ...,
loglevel=...,
) -> None: ...
def _log(self, *args, **kwargs) -> None: ...
def validate_xml_id(self, xml_id) -> None: ...
def get_id(self, xml_id): ...
def get_record(self, xml_id): ...
def get_context(self, node, eval_dict): ...
def isnoupdate(self, node): ...
def _get_first_result(self, results, default: bool = ...): ...
def process_comment(self, node): ...
def _log_assert_failure(self, msg, *args) -> None: ...
def _get_assertion_id(self, assertion): ...
def process_assert(self, node) -> None: ...
def _coerce_bool(self, value, default: bool = ...): ...
def create_osv_memory_record(self, record, fields): ...
def process_record(self, node) -> None: ...
_dict: Any
def _create_record(
self,
model,
fields,
view_info: Optional[Any] = ...,
parent=...,
default: bool = ...,
context: Optional[Any] = ...,
): ...
def process_ref(self, node, field: Optional[Any] = ...): ...
def process_eval(self, node): ...
def _eval_field(
self,
model,
field_name,
expression,
view_info: bool = ...,
parent=...,
default: bool = ...,
context: Optional[Any] = ...,
): ...
def process_context(self, node) -> None: ...
def process_python(self, node) -> None: ...
def _eval_params(self, model, params): ...
def process_function(self, node): ...
def _set_group_values(self, node, values) -> None: ...
def process_menuitem(self, node) -> None: ...
def process_act_window(self, node) -> None: ...
def process_delete(self, node) -> None: ...
@@ -111,8 +81,6 @@ class YamlInterpreter:
def process_report(self, node) -> None: ...
def process_none(self) -> None: ...
def process(self, yaml_string) -> None: ...
def _process_node(self, node) -> None: ...
def _log_node(self, node, is_preceded_by_comment): ...
def yaml_import(
cr,

View File

@@ -4,7 +4,6 @@ class YamlTag:
def __init__(self, **kwargs) -> None: ...
def __getitem__(self, key): ...
def __getattr__(self, attr) -> None: ...
def __repr__(self): ...
class Assert(YamlTag):
model: Any
@@ -22,14 +21,12 @@ class Record(YamlTag):
def __init__(
self, model, id, use: str = ..., view: bool = ..., **kwargs
) -> None: ...
def __str__(self): ...
class Python(YamlTag):
model: Any
severity: Any
name: Any
def __init__(self, model, severity=..., name: str = ..., **kwargs) -> None: ...
def __str__(self): ...
class Menuitem(YamlTag):
id: Any