mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
isort + black
This commit is contained in:
@@ -1,7 +1,20 @@
|
|||||||
from . import addons as addons, api as api, conf as conf, fields as fields, http as http, loglevels as loglevels, models as models, netsvc as netsvc, osv as osv, release as release, service as service, sql_db as sql_db, tools as tools
|
|
||||||
from .tools.translate import _ as _
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from . import addons as addons
|
||||||
|
from . import api as api
|
||||||
|
from . import conf as conf
|
||||||
|
from . import fields as fields
|
||||||
|
from . import http as http
|
||||||
|
from . import loglevels as loglevels
|
||||||
|
from . import models as models
|
||||||
|
from . import netsvc as netsvc
|
||||||
|
from . import osv as osv
|
||||||
|
from . import release as release
|
||||||
|
from . import service as service
|
||||||
|
from . import sql_db as sql_db
|
||||||
|
from . import tools as tools
|
||||||
|
from .tools.translate import _ as _
|
||||||
|
|
||||||
__path__: Any
|
__path__: Any
|
||||||
evented: bool
|
evented: bool
|
||||||
|
|
||||||
|
|||||||
@@ -74,11 +74,16 @@ class Environment(Mapping):
|
|||||||
def __eq__(self, other) -> bool: ...
|
def __eq__(self, other) -> bool: ...
|
||||||
def __ne__(self, other) -> bool: ...
|
def __ne__(self, other) -> bool: ...
|
||||||
def __hash__(self) -> int: ...
|
def __hash__(self) -> int: ...
|
||||||
def __call__(self, cr: Optional[Cursor] = ..., user: Optional[Any] = ..., context: Optional[Any] = ...) -> Environment: ...
|
def __call__(
|
||||||
|
self,
|
||||||
|
cr: Optional[Cursor] = ...,
|
||||||
|
user: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
) -> Environment: ...
|
||||||
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
|
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
|
||||||
@property
|
@property
|
||||||
def user(self):
|
def user(self):
|
||||||
return self['res.users']
|
return self["res.users"]
|
||||||
@property
|
@property
|
||||||
def lang(self) -> str: ...
|
def lang(self) -> str: ...
|
||||||
def _do_in_mode(self, mode) -> None: ...
|
def _do_in_mode(self, mode) -> None: ...
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class except_orm(Exception):
|
|||||||
|
|
||||||
class UserError(except_orm):
|
class UserError(except_orm):
|
||||||
def __init__(self, msg) -> None: ...
|
def __init__(self, msg) -> None: ...
|
||||||
|
|
||||||
Warning = UserError
|
Warning = UserError
|
||||||
|
|
||||||
class RedirectWarning(Exception):
|
class RedirectWarning(Exception):
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from typing import Any, Generic, Optional, TypeVar, overload
|
|||||||
|
|
||||||
from .models import BaseModel
|
from .models import BaseModel
|
||||||
|
|
||||||
_FieldT = TypeVar('_FieldT', bound=Field)
|
_FieldT = TypeVar("_FieldT", bound=Field)
|
||||||
_FieldValueT = TypeVar('_FieldValueT')
|
_FieldValueT = TypeVar("_FieldValueT")
|
||||||
|
|
||||||
DATE_LENGTH: Any
|
DATE_LENGTH: Any
|
||||||
DATETIME_LENGTH: Any
|
DATETIME_LENGTH: Any
|
||||||
@@ -261,6 +261,7 @@ class Datetime(Field[datetime.datetime]):
|
|||||||
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
def convert_to_cache(self, value, record, validate: bool = ...): ...
|
||||||
def convert_to_export(self, value, record): ...
|
def convert_to_export(self, value, record): ...
|
||||||
def convert_to_display_name(self, value, record): ...
|
def convert_to_display_name(self, value, record): ...
|
||||||
|
|
||||||
_BINARY = memoryview
|
_BINARY = memoryview
|
||||||
|
|
||||||
class Binary(Field[bytes]):
|
class Binary(Field[bytes]):
|
||||||
@@ -358,7 +359,9 @@ class _RelationalMulti(_Relational):
|
|||||||
class One2many(_RelationalMulti):
|
class One2many(_RelationalMulti):
|
||||||
type: str
|
type: str
|
||||||
_slots: Any
|
_slots: Any
|
||||||
def __init__(self, comodel_name=..., inverse_name=..., string=..., **kwargs) -> None: ...
|
def __init__(
|
||||||
|
self, comodel_name=..., inverse_name=..., string=..., **kwargs
|
||||||
|
) -> None: ...
|
||||||
def _setup_regular_full(self, model) -> None: ...
|
def _setup_regular_full(self, model) -> None: ...
|
||||||
_description_relation_field: Any
|
_description_relation_field: Any
|
||||||
def convert_to_onchange(self, value, record, names): ...
|
def convert_to_onchange(self, value, record, names): ...
|
||||||
@@ -369,7 +372,15 @@ class One2many(_RelationalMulti):
|
|||||||
class Many2many(_RelationalMulti):
|
class Many2many(_RelationalMulti):
|
||||||
type: str
|
type: str
|
||||||
_slots: Any
|
_slots: Any
|
||||||
def __init__(self, comodel_name=..., relation=..., column1=..., column2=..., string=..., **kwargs) -> None: ...
|
def __init__(
|
||||||
|
self,
|
||||||
|
comodel_name=...,
|
||||||
|
relation=...,
|
||||||
|
column1=...,
|
||||||
|
column2=...,
|
||||||
|
string=...,
|
||||||
|
**kwargs
|
||||||
|
) -> None: ...
|
||||||
relation: Any
|
relation: Any
|
||||||
column1: Any
|
column1: Any
|
||||||
column2: Any
|
column2: Any
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ def replace_request_password(args): ...
|
|||||||
NO_POSTMORTEM: Any
|
NO_POSTMORTEM: Any
|
||||||
|
|
||||||
def dispatch_rpc(service_name, method, params): ...
|
def dispatch_rpc(service_name, method, params): ...
|
||||||
def local_redirect(path, query: Optional[Any] = ..., keep_hash: bool = ..., forward_debug: bool = ..., code: int = ...): ...
|
def local_redirect(
|
||||||
|
path,
|
||||||
|
query: Optional[Any] = ...,
|
||||||
|
keep_hash: bool = ...,
|
||||||
|
forward_debug: bool = ...,
|
||||||
|
code: int = ...,
|
||||||
|
): ...
|
||||||
def redirect_with_hash(url, code: int = ...): ...
|
def redirect_with_hash(url, code: int = ...): ...
|
||||||
|
|
||||||
class WebRequest:
|
class WebRequest:
|
||||||
@@ -28,7 +34,7 @@ class WebRequest:
|
|||||||
endpoint: Any
|
endpoint: Any
|
||||||
endpoint_arguments: Any
|
endpoint_arguments: Any
|
||||||
auth_method: Any
|
auth_method: Any
|
||||||
website = Environment()['website']
|
website = Environment()["website"]
|
||||||
_cr: Cursor
|
_cr: Cursor
|
||||||
_uid: int
|
_uid: int
|
||||||
_context: dict
|
_context: dict
|
||||||
@@ -77,7 +83,9 @@ class JsonRequest(WebRequest):
|
|||||||
jsonrequest: Any
|
jsonrequest: Any
|
||||||
context: Any
|
context: Any
|
||||||
def __init__(self, *args): ...
|
def __init__(self, *args): ...
|
||||||
def _json_response(self, result: Optional[Any] = ..., error: Optional[Any] = ...): ...
|
def _json_response(
|
||||||
|
self, result: Optional[Any] = ..., error: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
def _handle_exception(self, exception): ...
|
def _handle_exception(self, exception): ...
|
||||||
def dispatch(self): ...
|
def dispatch(self): ...
|
||||||
|
|
||||||
@@ -89,8 +97,12 @@ class HttpRequest(WebRequest):
|
|||||||
def __init__(self, *args) -> None: ...
|
def __init__(self, *args) -> None: ...
|
||||||
def _handle_exception(self, exception): ...
|
def _handle_exception(self, exception): ...
|
||||||
def dispatch(self): ...
|
def dispatch(self): ...
|
||||||
def make_response(self, data, headers: Optional[Any] = ..., cookies: Optional[Any] = ...): ...
|
def make_response(
|
||||||
def render(self, template, qcontext: Optional[Any] = ..., lazy: bool = ..., **kw): ...
|
self, data, headers: Optional[Any] = ..., cookies: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
|
def render(
|
||||||
|
self, template, qcontext: Optional[Any] = ..., lazy: bool = ..., **kw
|
||||||
|
): ...
|
||||||
def not_found(self, description: Optional[Any] = ...): ...
|
def not_found(self, description: Optional[Any] = ...): ...
|
||||||
|
|
||||||
addons_module: Any
|
addons_module: Any
|
||||||
@@ -128,7 +140,13 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
|
|||||||
uid: Any
|
uid: Any
|
||||||
login: Any
|
login: Any
|
||||||
session_token: Any
|
session_token: Any
|
||||||
def authenticate(self, db, login: Optional[Any] = ..., password: Optional[Any] = ..., uid: Optional[Any] = ...): ...
|
def authenticate(
|
||||||
|
self,
|
||||||
|
db,
|
||||||
|
login: Optional[Any] = ...,
|
||||||
|
password: Optional[Any] = ...,
|
||||||
|
uid: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def check_security(self) -> None: ...
|
def check_security(self) -> None: ...
|
||||||
def logout(self, keep_db: bool = ...) -> None: ...
|
def logout(self, keep_db: bool = ...) -> None: ...
|
||||||
def _default_values(self) -> None: ...
|
def _default_values(self) -> None: ...
|
||||||
@@ -148,7 +166,12 @@ class Response(werkzeug.wrappers.Response):
|
|||||||
template: Any
|
template: Any
|
||||||
qcontext: Any
|
qcontext: Any
|
||||||
uid: Any
|
uid: Any
|
||||||
def set_default(self, template: Optional[Any] = ..., qcontext: Optional[Any] = ..., uid: Optional[Any] = ...) -> None: ...
|
def set_default(
|
||||||
|
self,
|
||||||
|
template: Optional[Any] = ...,
|
||||||
|
qcontext: Optional[Any] = ...,
|
||||||
|
uid: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
@property
|
@property
|
||||||
def is_qweb(self): ...
|
def is_qweb(self): ...
|
||||||
def render(self): ...
|
def render(self): ...
|
||||||
@@ -177,7 +200,16 @@ class Root:
|
|||||||
def db_list(force: bool = ..., httprequest: Optional[Any] = ...): ...
|
def db_list(force: bool = ..., httprequest: Optional[Any] = ...): ...
|
||||||
def db_filter(dbs, httprequest: Optional[Any] = ...): ...
|
def db_filter(dbs, httprequest: Optional[Any] = ...): ...
|
||||||
def db_monodb(httprequest: Optional[Any] = ...): ...
|
def db_monodb(httprequest: Optional[Any] = ...): ...
|
||||||
def send_file(filepath_or_fp, mimetype: Optional[Any] = ..., as_attachment: bool = ..., filename: Optional[Any] = ..., mtime: Optional[Any] = ..., add_etags: bool = ..., cache_timeout=..., conditional: bool = ...): ...
|
def send_file(
|
||||||
|
filepath_or_fp,
|
||||||
|
mimetype: Optional[Any] = ...,
|
||||||
|
as_attachment: bool = ...,
|
||||||
|
filename: Optional[Any] = ...,
|
||||||
|
mtime: Optional[Any] = ...,
|
||||||
|
add_etags: bool = ...,
|
||||||
|
cache_timeout=...,
|
||||||
|
conditional: bool = ...,
|
||||||
|
): ...
|
||||||
def content_disposition(filename): ...
|
def content_disposition(filename): ...
|
||||||
|
|
||||||
class CommonController(Controller):
|
class CommonController(Controller):
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
from collections import MutableMapping
|
from collections import MutableMapping
|
||||||
from typing import Any, Optional, List, Dict, Generator, TypeVar
|
from typing import Any, Dict, Generator, List, Optional, TypeVar
|
||||||
|
|
||||||
from . import api, fields
|
from . import api, fields
|
||||||
from .api import Environment
|
from .api import Environment
|
||||||
from .modules.registry import Registry
|
from .modules.registry import Registry
|
||||||
from .sql_db import Cursor
|
from .sql_db import Cursor
|
||||||
|
|
||||||
_ModelT = TypeVar('_ModelT', bound=BaseModel)
|
_ModelT = TypeVar("_ModelT", bound=BaseModel)
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
_schema: Any
|
_schema: Any
|
||||||
@@ -79,9 +79,9 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
pool: Registry
|
pool: Registry
|
||||||
id = fields.Id()
|
id = fields.Id()
|
||||||
display_name = fields.Char()
|
display_name = fields.Char()
|
||||||
create_uid = fields.Many2one('res.users')
|
create_uid = fields.Many2one("res.users")
|
||||||
create_date = fields.Datetime()
|
create_date = fields.Datetime()
|
||||||
write_uid = fields.Many2one('res.users')
|
write_uid = fields.Many2one("res.users")
|
||||||
write_date = fields.Datetime()
|
write_date = fields.Datetime()
|
||||||
CONCURRENCY_CHECK_FIELD: str
|
CONCURRENCY_CHECK_FIELD: str
|
||||||
def view_init(self, fields_list) -> None: ...
|
def view_init(self, fields_list) -> None: ...
|
||||||
@@ -130,32 +130,97 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _get_default_graph_view(self): ...
|
def _get_default_graph_view(self): ...
|
||||||
def _get_default_calendar_view(self): ...
|
def _get_default_calendar_view(self): ...
|
||||||
def load_views(self, views, options: Optional[Any] = ...): ...
|
def load_views(self, views, options: Optional[Any] = ...): ...
|
||||||
def _fields_view_get(self, view_id: Optional[Any] = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...): ...
|
def _fields_view_get(
|
||||||
def fields_view_get(self, view_id: Optional[Any] = ..., view_type: str = ..., toolbar: bool = ..., submenu: bool = ...): ...
|
self,
|
||||||
|
view_id: Optional[Any] = ...,
|
||||||
|
view_type: str = ...,
|
||||||
|
toolbar: bool = ...,
|
||||||
|
submenu: bool = ...,
|
||||||
|
): ...
|
||||||
|
def fields_view_get(
|
||||||
|
self,
|
||||||
|
view_id: Optional[Any] = ...,
|
||||||
|
view_type: str = ...,
|
||||||
|
toolbar: bool = ...,
|
||||||
|
submenu: bool = ...,
|
||||||
|
): ...
|
||||||
def get_formview_id(self, access_uid: Optional[Any] = ...): ...
|
def get_formview_id(self, access_uid: Optional[Any] = ...): ...
|
||||||
def get_formview_action(self, access_uid: Optional[Any] = ...): ...
|
def get_formview_action(self, access_uid: Optional[Any] = ...): ...
|
||||||
def get_access_action(self, access_uid: Optional[Any] = ...): ...
|
def get_access_action(self, access_uid: Optional[Any] = ...): ...
|
||||||
def search_count(self, args) -> int: ...
|
def search_count(self, args) -> int: ...
|
||||||
def search(self: _ModelT, args, offset: int = ..., limit: Optional[Any] = ..., order: Optional[Any] = ..., count: bool = ...) -> _ModelT: ...
|
def search(
|
||||||
|
self: _ModelT,
|
||||||
|
args,
|
||||||
|
offset: int = ...,
|
||||||
|
limit: Optional[Any] = ...,
|
||||||
|
order: Optional[Any] = ...,
|
||||||
|
count: bool = ...,
|
||||||
|
) -> _ModelT: ...
|
||||||
def _compute_display_name(self) -> None: ...
|
def _compute_display_name(self) -> None: ...
|
||||||
def name_get(self): ...
|
def name_get(self): ...
|
||||||
def name_create(self, name): ...
|
def name_create(self, name): ...
|
||||||
def name_search(self, name: str = ..., args: Optional[Any] = ..., operator: str = ..., limit: int = ...): ...
|
def name_search(
|
||||||
def _name_search(self, name: str = ..., args: Optional[Any] = ..., operator: str = ..., limit: int = ..., name_get_uid: Optional[Any] = ...): ...
|
self,
|
||||||
|
name: str = ...,
|
||||||
|
args: Optional[Any] = ...,
|
||||||
|
operator: str = ...,
|
||||||
|
limit: int = ...,
|
||||||
|
): ...
|
||||||
|
def _name_search(
|
||||||
|
self,
|
||||||
|
name: str = ...,
|
||||||
|
args: Optional[Any] = ...,
|
||||||
|
operator: str = ...,
|
||||||
|
limit: int = ...,
|
||||||
|
name_get_uid: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def _add_missing_default_values(self, values): ...
|
def _add_missing_default_values(self, values): ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_caches(cls) -> None: ...
|
def clear_caches(cls) -> None: ...
|
||||||
def _read_group_fill_results(self, domain, groupby, remaining_groupbys, aggregated_fields, count_field, read_group_result, read_group_order: Optional[Any] = ...): ...
|
def _read_group_fill_results(
|
||||||
def _read_group_fill_temporal(self, data, groupby, aggregated_fields, annotated_groupbys, interval=...): ...
|
self,
|
||||||
def _read_group_prepare(self, orderby, aggregated_fields, annotated_groupbys, query): ...
|
domain,
|
||||||
|
groupby,
|
||||||
|
remaining_groupbys,
|
||||||
|
aggregated_fields,
|
||||||
|
count_field,
|
||||||
|
read_group_result,
|
||||||
|
read_group_order: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
def _read_group_fill_temporal(
|
||||||
|
self, data, groupby, aggregated_fields, annotated_groupbys, interval=...
|
||||||
|
): ...
|
||||||
|
def _read_group_prepare(
|
||||||
|
self, orderby, aggregated_fields, annotated_groupbys, query
|
||||||
|
): ...
|
||||||
def _read_group_process_groupby(self, gb, query): ...
|
def _read_group_process_groupby(self, gb, query): ...
|
||||||
def _read_group_prepare_data(self, key, value, groupby_dict): ...
|
def _read_group_prepare_data(self, key, value, groupby_dict): ...
|
||||||
def _read_group_format_result(self, data, annotated_groupbys, groupby, domain): ...
|
def _read_group_format_result(self, data, annotated_groupbys, groupby, domain): ...
|
||||||
def read_group(self, domain, fields, groupby, offset: int = ..., limit: Optional[Any] = ..., orderby: bool = ..., lazy: bool = ...): ...
|
def read_group(
|
||||||
def _read_group_raw(self, domain, fields, groupby, offset: int = ..., limit: Optional[Any] = ..., orderby: bool = ..., lazy: bool = ...): ...
|
self,
|
||||||
|
domain,
|
||||||
|
fields,
|
||||||
|
groupby,
|
||||||
|
offset: int = ...,
|
||||||
|
limit: Optional[Any] = ...,
|
||||||
|
orderby: bool = ...,
|
||||||
|
lazy: bool = ...,
|
||||||
|
): ...
|
||||||
|
def _read_group_raw(
|
||||||
|
self,
|
||||||
|
domain,
|
||||||
|
fields,
|
||||||
|
groupby,
|
||||||
|
offset: int = ...,
|
||||||
|
limit: Optional[Any] = ...,
|
||||||
|
orderby: bool = ...,
|
||||||
|
lazy: bool = ...,
|
||||||
|
): ...
|
||||||
def _read_group_resolve_many2one_fields(self, data, fields) -> None: ...
|
def _read_group_resolve_many2one_fields(self, data, fields) -> None: ...
|
||||||
def _inherits_join_add(self, current_model, parent_model_name, query): ...
|
def _inherits_join_add(self, current_model, parent_model_name, query): ...
|
||||||
def _inherits_join_calc(self, alias, fname, query, implicit: bool = ..., outer: bool = ...): ...
|
def _inherits_join_calc(
|
||||||
|
self, alias, fname, query, implicit: bool = ..., outer: bool = ...
|
||||||
|
): ...
|
||||||
def _parent_store_compute(self): ...
|
def _parent_store_compute(self): ...
|
||||||
def _check_selection_field_value(self, field, value) -> None: ...
|
def _check_selection_field_value(self, field, value) -> None: ...
|
||||||
def _check_removed_columns(self, log: bool = ...) -> None: ...
|
def _check_removed_columns(self, log: bool = ...) -> None: ...
|
||||||
@@ -172,7 +237,9 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _setup_base(self): ...
|
def _setup_base(self): ...
|
||||||
def _setup_fields(self) -> None: ...
|
def _setup_fields(self) -> None: ...
|
||||||
def _setup_complete(self) -> None: ...
|
def _setup_complete(self) -> None: ...
|
||||||
def fields_get(self, allfields: Optional[Any] = ..., attributes: Optional[Any] = ...): ...
|
def fields_get(
|
||||||
|
self, allfields: Optional[Any] = ..., attributes: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
def get_empty_list_help(self, help): ...
|
def get_empty_list_help(self, help): ...
|
||||||
def check_field_access_rights(self, operation, fields): ...
|
def check_field_access_rights(self, operation, fields): ...
|
||||||
def read(self, fields: Optional[Any] = ..., load: str = ...): ...
|
def read(self, fields: Optional[Any] = ..., load: str = ...): ...
|
||||||
@@ -192,10 +259,27 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _check_qorder(self, word): ...
|
def _check_qorder(self, word): ...
|
||||||
def _apply_ir_rules(self, query, mode: str = ...) -> None: ...
|
def _apply_ir_rules(self, query, mode: str = ...) -> None: ...
|
||||||
def _generate_translated_field(self, table_alias, field, query): ...
|
def _generate_translated_field(self, table_alias, field, query): ...
|
||||||
def _generate_m2o_order_by(self, alias, order_field, query, reverse_direction, seen): ...
|
def _generate_m2o_order_by(
|
||||||
def _generate_order_by_inner(self, alias, order_spec, query, reverse_direction: bool = ..., seen: Optional[Any] = ...): ...
|
self, alias, order_field, query, reverse_direction, seen
|
||||||
|
): ...
|
||||||
|
def _generate_order_by_inner(
|
||||||
|
self,
|
||||||
|
alias,
|
||||||
|
order_spec,
|
||||||
|
query,
|
||||||
|
reverse_direction: bool = ...,
|
||||||
|
seen: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def _generate_order_by(self, order_spec, query): ...
|
def _generate_order_by(self, order_spec, query): ...
|
||||||
def _search(self, args, offset: int = ..., limit: Optional[Any] = ..., order: Optional[Any] = ..., count: bool = ..., access_rights_uid: Optional[Any] = ...): ...
|
def _search(
|
||||||
|
self,
|
||||||
|
args,
|
||||||
|
offset: int = ...,
|
||||||
|
limit: Optional[Any] = ...,
|
||||||
|
order: Optional[Any] = ...,
|
||||||
|
count: bool = ...,
|
||||||
|
access_rights_uid: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def copy_data(self, default: Optional[Any] = ...): ...
|
def copy_data(self, default: Optional[Any] = ...): ...
|
||||||
def copy_translations(old, new, excluded=...): ...
|
def copy_translations(old, new, excluded=...): ...
|
||||||
def copy(self: _ModelT, default: Optional[Any] = ...) -> _ModelT: ...
|
def copy(self: _ModelT, default: Optional[Any] = ...) -> _ModelT: ...
|
||||||
@@ -211,9 +295,18 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _transient_clean_rows_older_than(self, seconds) -> None: ...
|
def _transient_clean_rows_older_than(self, seconds) -> None: ...
|
||||||
def _transient_clean_old_rows(self, max_count) -> None: ...
|
def _transient_clean_old_rows(self, max_count) -> None: ...
|
||||||
def _transient_vacuum(self, force: bool = ...): ...
|
def _transient_vacuum(self, force: bool = ...): ...
|
||||||
def resolve_2many_commands(self, field_name, commands, fields: Optional[Any] = ...): ...
|
def resolve_2many_commands(
|
||||||
|
self, field_name, commands, fields: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
resolve_o2m_commands_to_record_dicts: Any
|
resolve_o2m_commands_to_record_dicts: Any
|
||||||
def search_read(self, domain: Optional[Any] = ..., fields: Optional[Any] = ..., offset: int = ..., limit: Optional[Any] = ..., order: Optional[Any] = ...): ...
|
def search_read(
|
||||||
|
self,
|
||||||
|
domain: Optional[Any] = ...,
|
||||||
|
fields: Optional[Any] = ...,
|
||||||
|
offset: int = ...,
|
||||||
|
limit: Optional[Any] = ...,
|
||||||
|
order: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def toggle_active(self) -> None: ...
|
def toggle_active(self) -> None: ...
|
||||||
def _register_hook(self) -> None: ...
|
def _register_hook(self) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -221,8 +314,12 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _revert_method(cls, name) -> None: ...
|
def _revert_method(cls, name) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def _browse(cls, ids, env, prefetch: Optional[Any] = ..., add_prefetch: bool = ...): ...
|
def _browse(
|
||||||
def browse(self: _ModelT, arg: Optional[Any] = ..., prefetch: Optional[Any] = ...) -> _ModelT: ...
|
cls, ids, env, prefetch: Optional[Any] = ..., add_prefetch: bool = ...
|
||||||
|
): ...
|
||||||
|
def browse(
|
||||||
|
self: _ModelT, arg: Optional[Any] = ..., prefetch: Optional[Any] = ...
|
||||||
|
) -> _ModelT: ...
|
||||||
@property
|
@property
|
||||||
def ids(self) -> List[int]: ...
|
def ids(self) -> List[int]: ...
|
||||||
_cr: Cursor
|
_cr: Cursor
|
||||||
@@ -240,7 +337,9 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def mapped(self, func): ...
|
def mapped(self, func): ...
|
||||||
def _mapped_cache(self, name_seq): ...
|
def _mapped_cache(self, name_seq): ...
|
||||||
def filtered(self: _ModelT, func) -> _ModelT: ...
|
def filtered(self: _ModelT, func) -> _ModelT: ...
|
||||||
def sorted(self: _ModelT, key: Optional[Any] = ..., reverse: bool = ...) -> _ModelT: ...
|
def sorted(
|
||||||
|
self: _ModelT, key: Optional[Any] = ..., reverse: bool = ...
|
||||||
|
) -> _ModelT: ...
|
||||||
def update(self, values) -> None: ...
|
def update(self, values) -> None: ...
|
||||||
def new(self: _ModelT, values=..., ref: Optional[Any] = ...) -> _ModelT: ...
|
def new(self: _ModelT, values=..., ref: Optional[Any] = ...) -> _ModelT: ...
|
||||||
def _is_dirty(self): ...
|
def _is_dirty(self): ...
|
||||||
@@ -272,7 +371,9 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
def _cache(self): ...
|
def _cache(self): ...
|
||||||
def _in_cache_without(self, field, limit=...): ...
|
def _in_cache_without(self, field, limit=...): ...
|
||||||
def refresh(self) -> None: ...
|
def refresh(self) -> None: ...
|
||||||
def invalidate_cache(self, fnames: Optional[Any] = ..., ids: Optional[Any] = ...): ...
|
def invalidate_cache(
|
||||||
|
self, fnames: Optional[Any] = ..., ids: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
def modified(self, fnames) -> None: ...
|
def modified(self, fnames) -> None: ...
|
||||||
def _recompute_check(self, field): ...
|
def _recompute_check(self, field): ...
|
||||||
def _recompute_todo(self, field) -> None: ...
|
def _recompute_todo(self, field) -> None: ...
|
||||||
@@ -296,6 +397,7 @@ class RecordCache(MutableMapping):
|
|||||||
def get_value(self, name, default: Optional[Any] = ...): ...
|
def get_value(self, name, default: Optional[Any] = ...): ...
|
||||||
def set_special(self, name, getter) -> None: ...
|
def set_special(self, name, getter) -> None: ...
|
||||||
def set_failed(self, names, exception) -> None: ...
|
def set_failed(self, names, exception) -> None: ...
|
||||||
|
|
||||||
AbstractModel = BaseModel
|
AbstractModel = BaseModel
|
||||||
|
|
||||||
class Model(AbstractModel):
|
class Model(AbstractModel):
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
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
|
||||||
from odoo.modules.loading import load_modules as load_modules, reset_modules_state as reset_modules_state
|
from odoo.modules.loading import 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
|
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
|
||||||
|
|||||||
@@ -3,8 +3,28 @@ from typing import Any, Optional
|
|||||||
_logger: Any
|
_logger: Any
|
||||||
_test_logger: Any
|
_test_logger: Any
|
||||||
|
|
||||||
def load_module_graph(cr, graph, status: Optional[Any] = ..., perform_checks: bool = ..., skip_modules: Optional[Any] = ..., report: Optional[Any] = ..., models_to_check: Optional[Any] = ...): ...
|
def load_module_graph(
|
||||||
|
cr,
|
||||||
|
graph,
|
||||||
|
status: Optional[Any] = ...,
|
||||||
|
perform_checks: bool = ...,
|
||||||
|
skip_modules: Optional[Any] = ...,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
models_to_check: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def _check_module_names(cr, module_names) -> None: ...
|
def _check_module_names(cr, module_names) -> None: ...
|
||||||
def load_marked_modules(cr, graph, states, force, progressdict, report, loaded_modules, perform_checks, models_to_check: Optional[Any] = ...): ...
|
def load_marked_modules(
|
||||||
def load_modules(db, force_demo: bool = ..., status: Optional[Any] = ..., update_module: bool = ...): ...
|
cr,
|
||||||
|
graph,
|
||||||
|
states,
|
||||||
|
force,
|
||||||
|
progressdict,
|
||||||
|
report,
|
||||||
|
loaded_modules,
|
||||||
|
perform_checks,
|
||||||
|
models_to_check: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
def load_modules(
|
||||||
|
db, force_demo: bool = ..., status: Optional[Any] = ..., update_module: bool = ...
|
||||||
|
): ...
|
||||||
def reset_modules_state(db_name) -> None: ...
|
def reset_modules_state(db_name) -> None: ...
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from odoo import SUPERUSER_ID as SUPERUSER_ID, api as api
|
|
||||||
from operator import itemgetter as itemgetter
|
from operator import itemgetter as itemgetter
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from odoo import SUPERUSER_ID as SUPERUSER_ID
|
||||||
|
from odoo import api as api
|
||||||
|
|
||||||
MANIFEST_NAMES: Any
|
MANIFEST_NAMES: Any
|
||||||
README: Any
|
README: Any
|
||||||
_logger: Any
|
_logger: Any
|
||||||
@@ -21,6 +23,7 @@ def initialize_sys_path() -> None: ...
|
|||||||
def get_module_path(module, downloaded: bool = ..., display_warning: bool = ...): ...
|
def get_module_path(module, downloaded: bool = ..., display_warning: bool = ...): ...
|
||||||
def get_module_filetree(module, dir: str = ...): ...
|
def get_module_filetree(module, dir: str = ...): ...
|
||||||
def get_resource_path(module, *args): ...
|
def get_resource_path(module, *args): ...
|
||||||
|
|
||||||
get_module_resource = get_resource_path
|
get_module_resource = get_resource_path
|
||||||
|
|
||||||
def get_resource_from_path(path): ...
|
def get_resource_from_path(path): ...
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
from collections import Mapping, defaultdict as defaultdict
|
from collections import Mapping
|
||||||
|
from collections import defaultdict as defaultdict
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
from odoo.sql_db import Cursor
|
from odoo.sql_db import Cursor
|
||||||
from odoo.tools import table_exists as table_exists
|
from odoo.tools import table_exists as table_exists
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
|
|
||||||
@@ -13,7 +14,13 @@ class Registry(Mapping):
|
|||||||
def registries(cls): ...
|
def registries(cls): ...
|
||||||
def __new__(cls, db_name): ...
|
def __new__(cls, db_name): ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, db_name, force_demo: bool = ..., status: Optional[Any] = ..., update_module: bool = ...): ...
|
def new(
|
||||||
|
cls,
|
||||||
|
db_name,
|
||||||
|
force_demo: bool = ...,
|
||||||
|
status: Optional[Any] = ...,
|
||||||
|
update_module: bool = ...,
|
||||||
|
): ...
|
||||||
models: Any
|
models: Any
|
||||||
_sql_error: Any
|
_sql_error: Any
|
||||||
_init: bool
|
_init: bool
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from ..models import MAGIC_COLUMNS as MAGIC_COLUMNS
|
|
||||||
from functools import partial as partial
|
from functools import partial as partial
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from ..models import MAGIC_COLUMNS as MAGIC_COLUMNS
|
||||||
|
|
||||||
NOT_OPERATOR: str
|
NOT_OPERATOR: str
|
||||||
OR_OPERATOR: str
|
OR_OPERATOR: str
|
||||||
AND_OPERATOR: str
|
AND_OPERATOR: str
|
||||||
@@ -28,7 +29,9 @@ def get_alias_from_query(from_query): ...
|
|||||||
def normalize_leaf(element): ...
|
def normalize_leaf(element): ...
|
||||||
def is_operator(element): ...
|
def is_operator(element): ...
|
||||||
def is_leaf(element, internal: bool = ...): ...
|
def is_leaf(element, internal: bool = ...): ...
|
||||||
def select_from_where(cr, select_field, from_table, where_field, where_ids, where_operator): ...
|
def select_from_where(
|
||||||
|
cr, select_field, from_table, where_field, where_ids, where_operator
|
||||||
|
): ...
|
||||||
def select_distinct_from_where_not_null(cr, select_field, from_table): ...
|
def select_distinct_from_where_not_null(cr, select_field, from_table): ...
|
||||||
def get_unaccent_wrapper(cr): ...
|
def get_unaccent_wrapper(cr): ...
|
||||||
|
|
||||||
@@ -37,7 +40,9 @@ class ExtendedLeaf:
|
|||||||
leaf: Any
|
leaf: Any
|
||||||
model: Any
|
model: Any
|
||||||
_models: Any
|
_models: Any
|
||||||
def __init__(self, leaf, model, join_context: Optional[Any] = ..., internal: bool = ...) -> None: ...
|
def __init__(
|
||||||
|
self, leaf, model, join_context: Optional[Any] = ..., internal: bool = ...
|
||||||
|
) -> None: ...
|
||||||
def __str__(self): ...
|
def __str__(self): ...
|
||||||
def generate_alias(self): ...
|
def generate_alias(self): ...
|
||||||
def add_join_context(self, model, lhs_col, table_col, link) -> None: ...
|
def add_join_context(self, model, lhs_col, table_col, link) -> None: ...
|
||||||
@@ -51,7 +56,9 @@ class ExtendedLeaf:
|
|||||||
def is_leaf(self, internal: bool = ...): ...
|
def is_leaf(self, internal: bool = ...): ...
|
||||||
def normalize_leaf(self): ...
|
def normalize_leaf(self): ...
|
||||||
|
|
||||||
def create_substitution_leaf(leaf, new_elements, new_model: Optional[Any] = ..., internal: bool = ...): ...
|
def create_substitution_leaf(
|
||||||
|
leaf, new_elements, new_model: Optional[Any] = ..., internal: bool = ...
|
||||||
|
): ...
|
||||||
|
|
||||||
class expression:
|
class expression:
|
||||||
_unaccent: Any
|
_unaccent: Any
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
from ..exceptions import except_orm as except_orm
|
|
||||||
from ..models import AbstractModel as AbstractModel, BaseModel, LOG_ACCESS_COLUMNS as LOG_ACCESS_COLUMNS, MAGIC_COLUMNS as MAGIC_COLUMNS, MetaModel as MetaModel, Model as Model, TransientModel as TransientModel
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from ..exceptions import except_orm as except_orm
|
||||||
|
from ..models import LOG_ACCESS_COLUMNS as LOG_ACCESS_COLUMNS
|
||||||
|
from ..models import MAGIC_COLUMNS as MAGIC_COLUMNS
|
||||||
|
from ..models import AbstractModel as AbstractModel
|
||||||
|
from ..models import BaseModel
|
||||||
|
from ..models import MetaModel as MetaModel
|
||||||
|
from ..models import Model as Model
|
||||||
|
from ..models import TransientModel as TransientModel
|
||||||
|
|
||||||
browse_record_list = BaseModel
|
browse_record_list = BaseModel
|
||||||
|
|
||||||
class BRM(type):
|
class BRM(type):
|
||||||
@@ -15,9 +22,16 @@ class NBM(type):
|
|||||||
browse_null: Any
|
browse_null: Any
|
||||||
|
|
||||||
def transfer_field_to_modifiers(field, modifiers) -> None: ...
|
def transfer_field_to_modifiers(field, modifiers) -> None: ...
|
||||||
def transfer_node_to_modifiers(node, modifiers, context: Optional[Any] = ..., in_tree_view: bool = ...) -> None: ...
|
def transfer_node_to_modifiers(
|
||||||
|
node, modifiers, context: Optional[Any] = ..., in_tree_view: bool = ...
|
||||||
|
) -> None: ...
|
||||||
def simplify_modifiers(modifiers) -> None: ...
|
def simplify_modifiers(modifiers) -> None: ...
|
||||||
def transfer_modifiers_to_node(modifiers, node) -> None: ...
|
def transfer_modifiers_to_node(modifiers, node) -> None: ...
|
||||||
def setup_modifiers(node, field: Optional[Any] = ..., context: Optional[Any] = ..., in_tree_view: bool = ...) -> None: ...
|
def setup_modifiers(
|
||||||
|
node,
|
||||||
|
field: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
in_tree_view: bool = ...,
|
||||||
|
) -> None: ...
|
||||||
def test_modifiers(what, expected) -> None: ...
|
def test_modifiers(what, expected) -> None: ...
|
||||||
def modifiers_tests() -> None: ...
|
def modifiers_tests() -> None: ...
|
||||||
|
|||||||
@@ -8,9 +8,23 @@ class Query:
|
|||||||
where_clause_params: Any
|
where_clause_params: Any
|
||||||
joins: Any
|
joins: Any
|
||||||
extras: 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 __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_table_aliases(self): ...
|
||||||
def _get_alias_mapping(self): ...
|
def _get_alias_mapping(self): ...
|
||||||
def add_join(self, connection, implicit: bool = ..., outer: bool = ..., extra: Optional[Any] = ..., extra_params=...): ...
|
def add_join(
|
||||||
|
self,
|
||||||
|
connection,
|
||||||
|
implicit: bool = ...,
|
||||||
|
outer: bool = ...,
|
||||||
|
extra: Optional[Any] = ...,
|
||||||
|
extra_params=...,
|
||||||
|
): ...
|
||||||
def get_sql(self): ...
|
def get_sql(self): ...
|
||||||
def __str__(self): ...
|
def __str__(self): ...
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
from . import common as common, db as db, model as model, server as server, wsgi_server as wsgi_server
|
from . import common as common
|
||||||
|
from . import db as db
|
||||||
|
from . import model as model
|
||||||
|
from . import server as server
|
||||||
|
from . import wsgi_server as wsgi_server
|
||||||
|
|||||||
@@ -7,9 +7,24 @@ class DatabaseExists(Warning): ...
|
|||||||
|
|
||||||
def check_db_management_enabled(method): ...
|
def check_db_management_enabled(method): ...
|
||||||
def check_super(passwd): ...
|
def check_super(passwd): ...
|
||||||
def _initialize_db(id, db_name, demo, lang, user_password, login: str = ..., country_code: Optional[Any] = ...) -> None: ...
|
def _initialize_db(
|
||||||
|
id,
|
||||||
|
db_name,
|
||||||
|
demo,
|
||||||
|
lang,
|
||||||
|
user_password,
|
||||||
|
login: str = ...,
|
||||||
|
country_code: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
def _create_empty_database(name) -> None: ...
|
def _create_empty_database(name) -> None: ...
|
||||||
def exp_create_database(db_name, demo, lang, user_password: str = ..., login: str = ..., country_code: Optional[Any] = ...): ...
|
def exp_create_database(
|
||||||
|
db_name,
|
||||||
|
demo,
|
||||||
|
lang,
|
||||||
|
user_password: str = ...,
|
||||||
|
login: str = ...,
|
||||||
|
country_code: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def exp_duplicate_database(db_original_name, db_name): ...
|
def exp_duplicate_database(db_original_name, db_name): ...
|
||||||
def _drop_conn(cr, db_name) -> None: ...
|
def _drop_conn(cr, db_name) -> None: ...
|
||||||
def exp_drop(db_name): ...
|
def exp_drop(db_name): ...
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import werkzeug.serving
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
import werkzeug.serving
|
||||||
|
|
||||||
INOTIFY_LISTEN_EVENTS: Any
|
INOTIFY_LISTEN_EVENTS: Any
|
||||||
_logger: Any
|
_logger: Any
|
||||||
SLEEP_INTERVAL: int
|
SLEEP_INTERVAL: int
|
||||||
@@ -18,7 +19,9 @@ class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGI
|
|||||||
class RequestHandler(werkzeug.serving.WSGIRequestHandler):
|
class RequestHandler(werkzeug.serving.WSGIRequestHandler):
|
||||||
def setup(self) -> None: ...
|
def setup(self) -> None: ...
|
||||||
|
|
||||||
class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer):
|
class ThreadedWSGIServerReloadable(
|
||||||
|
LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer
|
||||||
|
):
|
||||||
max_http_threads: Any
|
max_http_threads: Any
|
||||||
http_threads_sem: Any
|
http_threads_sem: Any
|
||||||
def __init__(self, host, port, app) -> None: ...
|
def __init__(self, host, port, app) -> None: ...
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Cursor:
|
|||||||
def dictfetchmany(self, size): ...
|
def dictfetchmany(self, size): ...
|
||||||
def dictfetchall(self): ...
|
def dictfetchall(self): ...
|
||||||
def __del__(self) -> None: ...
|
def __del__(self) -> None: ...
|
||||||
def execute(self, query, params: Optional[Any] = ..., log_exceptions: Optional[Any] = ...): ...
|
def execute(
|
||||||
|
self, query, params: Optional[Any] = ..., log_exceptions: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
def split_for_in_conditions(self, ids, size: Optional[Any] = ...): ...
|
def split_for_in_conditions(self, ids, size: Optional[Any] = ...): ...
|
||||||
def print_log(self): ...
|
def print_log(self): ...
|
||||||
def close(self): ...
|
def close(self): ...
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
from .common import *
|
|
||||||
from . import common as common
|
from . import common as common
|
||||||
|
from .common import *
|
||||||
|
|||||||
@@ -73,6 +73,14 @@ class HttpCase(TransactionCase):
|
|||||||
def phantom_poll(self, phantom, timeout): ...
|
def phantom_poll(self, phantom, timeout): ...
|
||||||
def phantom_run(self, cmd, timeout) -> None: ...
|
def phantom_run(self, cmd, timeout) -> None: ...
|
||||||
def _wait_remaining_requests(self) -> None: ...
|
def _wait_remaining_requests(self) -> None: ...
|
||||||
def phantom_js(self, url_path, code, ready: str = ..., login: Optional[Any] = ..., timeout: int = ..., **kw) -> None: ...
|
def phantom_js(
|
||||||
|
self,
|
||||||
|
url_path,
|
||||||
|
code,
|
||||||
|
ready: str = ...,
|
||||||
|
login: Optional[Any] = ...,
|
||||||
|
timeout: int = ...,
|
||||||
|
**kw
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
def can_import(module): ...
|
def can_import(module): ...
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
from .misc import *
|
from . import appdirs as appdirs
|
||||||
from .convert import *
|
from . import pdf as pdf
|
||||||
from .translate import *
|
from . import pycompat as pycompat
|
||||||
from .image import *
|
|
||||||
from .yaml_import import *
|
|
||||||
from .sql import *
|
|
||||||
from .float_utils import *
|
|
||||||
from .mail import *
|
|
||||||
from .func import *
|
|
||||||
from .debugger import *
|
|
||||||
from .xml_utils import *
|
|
||||||
from . import appdirs as appdirs, pdf as pdf, pycompat as pycompat
|
|
||||||
from .config import config as config
|
from .config import config as config
|
||||||
|
from .convert import *
|
||||||
|
from .debugger import *
|
||||||
|
from .float_utils import *
|
||||||
|
from .func import *
|
||||||
from .graph import graph as graph
|
from .graph import graph as graph
|
||||||
|
from .image import *
|
||||||
|
from .mail import *
|
||||||
|
from .misc import *
|
||||||
|
from .sql import *
|
||||||
|
from .translate import *
|
||||||
|
from .xml_utils import *
|
||||||
|
from .yaml_import import *
|
||||||
|
|||||||
@@ -3,12 +3,42 @@ from typing import Any, Optional
|
|||||||
__version_info__: Any
|
__version_info__: Any
|
||||||
__version__: Any
|
__version__: Any
|
||||||
|
|
||||||
def user_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
def user_data_dir(
|
||||||
def site_data_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
appname: Optional[Any] = ...,
|
||||||
def user_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ...): ...
|
appauthor: Optional[Any] = ...,
|
||||||
def site_config_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., multipath: bool = ...): ...
|
version: Optional[Any] = ...,
|
||||||
def user_cache_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: bool = ...): ...
|
roaming: bool = ...,
|
||||||
def user_log_dir(appname: Optional[Any] = ..., appauthor: Optional[Any] = ..., version: Optional[Any] = ..., opinion: 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:
|
class AppDirs:
|
||||||
appname: Any
|
appname: Any
|
||||||
@@ -16,7 +46,14 @@ class AppDirs:
|
|||||||
version: Any
|
version: Any
|
||||||
roaming: Any
|
roaming: Any
|
||||||
multipath: Any
|
multipath: Any
|
||||||
def __init__(self, appname, appauthor: Optional[Any] = ..., version: Optional[Any] = ..., roaming: bool = ..., multipath: bool = ...) -> None: ...
|
def __init__(
|
||||||
|
self,
|
||||||
|
appname,
|
||||||
|
appauthor: Optional[Any] = ...,
|
||||||
|
version: Optional[Any] = ...,
|
||||||
|
roaming: bool = ...,
|
||||||
|
multipath: bool = ...,
|
||||||
|
) -> None: ...
|
||||||
@property
|
@property
|
||||||
def user_data_dir(self): ...
|
def user_data_dir(self): ...
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -47,4 +47,5 @@ class dummy_cache:
|
|||||||
|
|
||||||
def log_ormcache_stats(sig: Optional[Any] = ..., frame: Optional[Any] = ...): ...
|
def log_ormcache_stats(sig: Optional[Any] = ..., frame: Optional[Any] = ...): ...
|
||||||
def get_cache_key_counter(bound_method, *args, **kwargs): ...
|
def get_cache_key_counter(bound_method, *args, **kwargs): ...
|
||||||
|
|
||||||
cache = ormcache
|
cache = ormcache
|
||||||
|
|||||||
@@ -28,15 +28,31 @@ class xml_import:
|
|||||||
def get_context(self, data_node, node, eval_dict): ...
|
def get_context(self, data_node, node, eval_dict): ...
|
||||||
def get_uid(self, data_node, node): ...
|
def get_uid(self, data_node, node): ...
|
||||||
def _test_xml_id(self, xml_id) -> None: ...
|
def _test_xml_id(self, xml_id) -> None: ...
|
||||||
def _tag_delete(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
def _tag_delete(
|
||||||
def _tag_report(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
|
||||||
def _tag_function(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
) -> None: ...
|
||||||
def _tag_act_window(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
def _tag_report(
|
||||||
def _tag_menuitem(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
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 _assert_equals(self, f1, f2, prec: int = ...): ...
|
||||||
def _tag_assert(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...) -> None: ...
|
def _tag_assert(
|
||||||
def _tag_record(self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...): ...
|
self, rec, data_node: Optional[Any] = ..., mode: Optional[Any] = ...
|
||||||
def _tag_template(self, el, 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 id_get(self, id_str, raise_if_not_found: bool = ...): ...
|
||||||
def model_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] = ...): ...
|
def parse(self, de, mode: Optional[Any] = ...): ...
|
||||||
@@ -50,9 +66,44 @@ class xml_import:
|
|||||||
noupdate: Any
|
noupdate: Any
|
||||||
xml_filename: Any
|
xml_filename: Any
|
||||||
_tags: Any
|
_tags: Any
|
||||||
def __init__(self, cr, module, idref, mode, report: Optional[Any] = ..., noupdate: bool = ..., xml_filename: Optional[Any] = ...) -> None: ...
|
def __init__(
|
||||||
|
self,
|
||||||
|
cr,
|
||||||
|
module,
|
||||||
|
idref,
|
||||||
|
mode,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
xml_filename: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
def convert_file(cr, module, filename, idref, mode: str = ..., noupdate: bool = ..., kind: Optional[Any] = ..., report: Optional[Any] = ..., pathname: Optional[Any] = ...) -> None: ...
|
def convert_file(
|
||||||
|
cr,
|
||||||
|
module,
|
||||||
|
filename,
|
||||||
|
idref,
|
||||||
|
mode: str = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
kind: Optional[Any] = ...,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
pathname: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
def convert_sql_import(cr, fp) -> None: ...
|
def convert_sql_import(cr, fp) -> None: ...
|
||||||
def convert_csv_import(cr, module, fname, csvcontent, idref: Optional[Any] = ..., mode: str = ..., noupdate: bool = ...) -> None: ...
|
def convert_csv_import(
|
||||||
def convert_xml_import(cr, module, xmlfile, idref: Optional[Any] = ..., mode: str = ..., noupdate: bool = ..., report: Optional[Any] = ...): ...
|
cr,
|
||||||
|
module,
|
||||||
|
fname,
|
||||||
|
csvcontent,
|
||||||
|
idref: Optional[Any] = ...,
|
||||||
|
mode: str = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
) -> None: ...
|
||||||
|
def convert_xml_import(
|
||||||
|
cr,
|
||||||
|
module,
|
||||||
|
xmlfile,
|
||||||
|
idref: Optional[Any] = ...,
|
||||||
|
mode: str = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -1,11 +1,28 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
def round(f): ...
|
def round(f): ...
|
||||||
def _float_check_precision(precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
def _float_check_precision(
|
||||||
def float_round(value, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ..., rounding_method: str = ...): ...
|
precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...
|
||||||
def float_is_zero(value, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
): ...
|
||||||
def float_compare(value1, value2, precision_digits: Optional[Any] = ..., precision_rounding: Optional[Any] = ...): ...
|
def float_round(
|
||||||
|
value,
|
||||||
|
precision_digits: Optional[Any] = ...,
|
||||||
|
precision_rounding: Optional[Any] = ...,
|
||||||
|
rounding_method: str = ...,
|
||||||
|
): ...
|
||||||
|
def float_is_zero(
|
||||||
|
value,
|
||||||
|
precision_digits: Optional[Any] = ...,
|
||||||
|
precision_rounding: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
def float_compare(
|
||||||
|
value1,
|
||||||
|
value2,
|
||||||
|
precision_digits: Optional[Any] = ...,
|
||||||
|
precision_rounding: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def float_repr(value, precision_digits): ...
|
def float_repr(value, precision_digits): ...
|
||||||
|
|
||||||
_float_repr = float_repr
|
_float_repr = float_repr
|
||||||
|
|
||||||
def float_split_str(value, precision_digits): ...
|
def float_split_str(value, precision_digits): ...
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ class graph:
|
|||||||
no_ancester: Any
|
no_ancester: Any
|
||||||
transitions: Any
|
transitions: Any
|
||||||
result: Any
|
result: Any
|
||||||
def __init__(self, nodes, transitions, no_ancester: Optional[Any] = ...) -> None: ...
|
def __init__(
|
||||||
|
self, nodes, transitions, no_ancester: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
edge_wt: Any
|
edge_wt: Any
|
||||||
def init_rank(self) -> None: ...
|
def init_rank(self) -> None: ...
|
||||||
reachable_nodes: Any
|
reachable_nodes: Any
|
||||||
@@ -50,5 +52,7 @@ class graph:
|
|||||||
start: Any
|
start: Any
|
||||||
def process(self, starting_node) -> None: ...
|
def process(self, starting_node) -> None: ...
|
||||||
def __str__(self): ...
|
def __str__(self): ...
|
||||||
def scale(self, maxx, maxy, nwidth: int = ..., nheight: int = ..., margin: int = ...) -> None: ...
|
def scale(
|
||||||
|
self, maxx, maxy, nwidth: int = ..., nheight: int = ..., margin: int = ...
|
||||||
|
) -> None: ...
|
||||||
def result_get(self): ...
|
def result_get(self): ...
|
||||||
|
|||||||
@@ -1,12 +1,57 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
def image_resize_image(base64_source, size=..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
def image_resize_image(
|
||||||
def image_resize_and_sharpen(image, size, preserve_aspect_ratio: bool = ..., factor: float = ...): ...
|
base64_source,
|
||||||
|
size=...,
|
||||||
|
encoding: str = ...,
|
||||||
|
filetype: Optional[Any] = ...,
|
||||||
|
avoid_if_small: bool = ...,
|
||||||
|
): ...
|
||||||
|
def image_resize_and_sharpen(
|
||||||
|
image, size, preserve_aspect_ratio: bool = ..., factor: float = ...
|
||||||
|
): ...
|
||||||
def image_save_for_web(image, fp: Optional[Any] = ..., format: Optional[Any] = ...): ...
|
def image_save_for_web(image, fp: Optional[Any] = ..., format: Optional[Any] = ...): ...
|
||||||
def image_resize_image_big(base64_source, size=..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
def image_resize_image_big(
|
||||||
def image_resize_image_medium(base64_source, size=..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
base64_source,
|
||||||
def image_resize_image_small(base64_source, size=..., encoding: str = ..., filetype: Optional[Any] = ..., avoid_if_small: bool = ...): ...
|
size=...,
|
||||||
def crop_image(data, type: str = ..., ratio: bool = ..., size: Optional[Any] = ..., image_format: Optional[Any] = ...): ...
|
encoding: str = ...,
|
||||||
|
filetype: Optional[Any] = ...,
|
||||||
|
avoid_if_small: bool = ...,
|
||||||
|
): ...
|
||||||
|
def image_resize_image_medium(
|
||||||
|
base64_source,
|
||||||
|
size=...,
|
||||||
|
encoding: str = ...,
|
||||||
|
filetype: Optional[Any] = ...,
|
||||||
|
avoid_if_small: bool = ...,
|
||||||
|
): ...
|
||||||
|
def image_resize_image_small(
|
||||||
|
base64_source,
|
||||||
|
size=...,
|
||||||
|
encoding: str = ...,
|
||||||
|
filetype: Optional[Any] = ...,
|
||||||
|
avoid_if_small: bool = ...,
|
||||||
|
): ...
|
||||||
|
def crop_image(
|
||||||
|
data,
|
||||||
|
type: str = ...,
|
||||||
|
ratio: bool = ...,
|
||||||
|
size: Optional[Any] = ...,
|
||||||
|
image_format: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
def image_colorize(original, randomize: bool = ..., color=...): ...
|
def image_colorize(original, randomize: bool = ..., color=...): ...
|
||||||
def image_get_resized_images(base64_source, 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 = ...): ...
|
def image_get_resized_images(
|
||||||
def image_resize_images(vals, big_name: str = ..., medium_name: str = ..., small_name: str = ...) -> None: ...
|
base64_source,
|
||||||
|
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 = ...,
|
||||||
|
): ...
|
||||||
|
def image_resize_images(
|
||||||
|
vals, big_name: str = ..., medium_name: str = ..., small_name: str = ...
|
||||||
|
) -> None: ...
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from lxml.html import clean
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from lxml.html import clean
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
tags_to_kill: Any
|
tags_to_kill: Any
|
||||||
tags_to_remove: Any
|
tags_to_remove: Any
|
||||||
@@ -17,11 +18,25 @@ class _Cleaner(clean.Cleaner):
|
|||||||
def strip_class(self, el) -> None: ...
|
def strip_class(self, el) -> None: ...
|
||||||
def parse_style(self, el) -> None: ...
|
def parse_style(self, el) -> None: ...
|
||||||
|
|
||||||
def html_sanitize(src, silent: bool = ..., sanitize_tags: bool = ..., sanitize_attributes: bool = ..., sanitize_style: bool = ..., strip_style: bool = ..., strip_classes: bool = ...): ...
|
def html_sanitize(
|
||||||
|
src,
|
||||||
|
silent: bool = ...,
|
||||||
|
sanitize_tags: bool = ...,
|
||||||
|
sanitize_attributes: bool = ...,
|
||||||
|
sanitize_style: bool = ...,
|
||||||
|
strip_style: bool = ...,
|
||||||
|
strip_classes: bool = ...,
|
||||||
|
): ...
|
||||||
def html_keep_url(text): ...
|
def html_keep_url(text): ...
|
||||||
def html2plaintext(html, body_id: Optional[Any] = ..., encoding: str = ...): ...
|
def html2plaintext(html, body_id: Optional[Any] = ..., encoding: str = ...): ...
|
||||||
def plaintext2html(text, container_tag: bool = ...): ...
|
def plaintext2html(text, container_tag: bool = ...): ...
|
||||||
def append_content_to_html(html, content, plaintext: bool = ..., preserve: bool = ..., container_tag: bool = ...): ...
|
def append_content_to_html(
|
||||||
|
html,
|
||||||
|
content,
|
||||||
|
plaintext: bool = ...,
|
||||||
|
preserve: bool = ...,
|
||||||
|
container_tag: bool = ...,
|
||||||
|
): ...
|
||||||
|
|
||||||
email_re: Any
|
email_re: Any
|
||||||
single_email_re: Any
|
single_email_re: Any
|
||||||
@@ -32,7 +47,29 @@ mail_header_msgid_re: Any
|
|||||||
email_addr_escapes_re: Any
|
email_addr_escapes_re: Any
|
||||||
|
|
||||||
def generate_tracking_message_id(res_id): ...
|
def generate_tracking_message_id(res_id): ...
|
||||||
def email_send(email_from, email_to, subject, body, email_cc: Optional[Any] = ..., email_bcc: Optional[Any] = ..., reply_to: bool = ..., attachments: Optional[Any] = ..., message_id: Optional[Any] = ..., references: Optional[Any] = ..., openobject_id: bool = ..., debug: bool = ..., subtype: str = ..., headers: Optional[Any] = ..., smtp_server: Optional[Any] = ..., smtp_port: Optional[Any] = ..., ssl: bool = ..., smtp_user: Optional[Any] = ..., smtp_password: Optional[Any] = ..., cr: Optional[Any] = ..., uid: Optional[Any] = ...): ...
|
def email_send(
|
||||||
|
email_from,
|
||||||
|
email_to,
|
||||||
|
subject,
|
||||||
|
body,
|
||||||
|
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): ...
|
def email_split(text): ...
|
||||||
def email_split_and_format(text): ...
|
def email_split_and_format(text): ...
|
||||||
def email_references(references): ...
|
def email_references(references): ...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
_Entry = namedtuple('_Entry', ['mimetype', 'signatures', 'discriminants'])
|
_Entry = namedtuple("_Entry", ["mimetype", "signatures", "discriminants"])
|
||||||
|
|
||||||
def guess_mimetype(bin_data, default: str = ...): ...
|
def guess_mimetype(bin_data, default: str = ...): ...
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
from .cache import *
|
|
||||||
import pickle as pickle_
|
import pickle as pickle_
|
||||||
import xlsxwriter
|
|
||||||
import xlwt
|
|
||||||
from collections import Mapping, MutableMapping, MutableSet, defaultdict
|
from collections import Mapping, MutableMapping, MutableSet, defaultdict
|
||||||
from itertools import repeat as repeat
|
from itertools import repeat as repeat
|
||||||
from odoo.loglevels import exception_to_unicode as exception_to_unicode, get_encodings as get_encodings
|
|
||||||
from typing import Any, Optional
|
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 .cache import *
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
SKIPPED_ELEMENT_TYPES: Any
|
SKIPPED_ELEMENT_TYPES: Any
|
||||||
|
|
||||||
@@ -72,7 +75,12 @@ class mute_logger:
|
|||||||
def __init__(self, *loggers) -> None: ...
|
def __init__(self, *loggers) -> None: ...
|
||||||
def filter(self, record): ...
|
def filter(self, record): ...
|
||||||
def __enter__(self) -> None: ...
|
def __enter__(self) -> None: ...
|
||||||
def __exit__(self, exc_type: Optional[Any] = ..., exc_val: Optional[Any] = ..., exc_tb: Optional[Any] = ...) -> None: ...
|
def __exit__(
|
||||||
|
self,
|
||||||
|
exc_type: Optional[Any] = ...,
|
||||||
|
exc_val: Optional[Any] = ...,
|
||||||
|
exc_tb: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
def __call__(self, func): ...
|
def __call__(self, func): ...
|
||||||
|
|
||||||
_ph: Any
|
_ph: Any
|
||||||
@@ -146,7 +154,15 @@ class Reverse:
|
|||||||
|
|
||||||
def ignore(*exc) -> None: ...
|
def ignore(*exc) -> None: ...
|
||||||
def html_escape(text): ...
|
def html_escape(text): ...
|
||||||
def formatLang(env, value, digits: Optional[Any] = ..., grouping: bool = ..., monetary: bool = ..., dp: bool = ..., currency_obj: bool = ...): ...
|
def formatLang(
|
||||||
|
env,
|
||||||
|
value,
|
||||||
|
digits: Optional[Any] = ...,
|
||||||
|
grouping: bool = ...,
|
||||||
|
monetary: bool = ...,
|
||||||
|
dp: bool = ...,
|
||||||
|
currency_obj: bool = ...,
|
||||||
|
): ...
|
||||||
def format_date(env, value, lang_code: str = ..., date_format: bool = ...): ...
|
def format_date(env, value, lang_code: str = ..., date_format: bool = ...): ...
|
||||||
def _consteq(str1, str2): ...
|
def _consteq(str1, str2): ...
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
import os
|
import os
|
||||||
from odoo.release import nt_service_name as nt_service_name
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from odoo.release import nt_service_name as nt_service_name
|
||||||
|
|
||||||
def listdir(dir, recursive: bool = ...): ...
|
def listdir(dir, recursive: bool = ...): ...
|
||||||
def walksymlinks(top, topdown: bool = ..., onerror: Optional[Any] = ...) -> None: ...
|
def walksymlinks(top, topdown: bool = ..., onerror: Optional[Any] = ...) -> None: ...
|
||||||
def tempdir() -> None: ...
|
def tempdir() -> None: ...
|
||||||
def zip_dir(path, stream, include_dir: bool = ..., fnct_sort: Optional[Any] = ...) -> None: ...
|
def zip_dir(
|
||||||
|
path, stream, include_dir: bool = ..., fnct_sort: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
getppid = os.getppid
|
getppid = os.getppid
|
||||||
is_running_as_nt_service: Any
|
is_running_as_nt_service: Any
|
||||||
_TH32CS_SNAPPROCESS: int
|
_TH32CS_SNAPPROCESS: int
|
||||||
|
|||||||
@@ -9,7 +9,20 @@ class _LogTracer:
|
|||||||
files: Any
|
files: Any
|
||||||
deep: Any
|
deep: Any
|
||||||
first_frame: Any
|
first_frame: Any
|
||||||
def __init__(self, whitelist: Optional[Any] = ..., blacklist: Optional[Any] = ..., files: Optional[Any] = ..., deep: bool = ...) -> None: ...
|
def __init__(
|
||||||
|
self,
|
||||||
|
whitelist: Optional[Any] = ...,
|
||||||
|
blacklist: Optional[Any] = ...,
|
||||||
|
files: Optional[Any] = ...,
|
||||||
|
deep: bool = ...,
|
||||||
|
) -> None: ...
|
||||||
def tracer(self, frame, event, arg): ...
|
def tracer(self, frame, event, arg): ...
|
||||||
|
|
||||||
def profile(method: Optional[Any] = ..., whitelist: Optional[Any] = ..., blacklist=..., files: Optional[Any] = ..., minimum_time: int = ..., minimum_queries: int = ...): ...
|
def profile(
|
||||||
|
method: Optional[Any] = ...,
|
||||||
|
whitelist: Optional[Any] = ...,
|
||||||
|
blacklist=...,
|
||||||
|
files: Optional[Any] = ...,
|
||||||
|
minimum_time: int = ...,
|
||||||
|
minimum_queries: int = ...,
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from typing import Any, Optional
|
|||||||
|
|
||||||
PY2: Any
|
PY2: Any
|
||||||
|
|
||||||
_Writer = namedtuple('_Writer', 'writerow writerows')
|
_Writer = namedtuple("_Writer", "writerow writerows")
|
||||||
unichr = chr
|
unichr = chr
|
||||||
text_type = str
|
text_type = str
|
||||||
string_types: Any
|
string_types: Any
|
||||||
|
|||||||
@@ -4,4 +4,11 @@ unsafe_eval = eval
|
|||||||
|
|
||||||
def test_expr(expr, allowed_codes, mode: str = ...): ...
|
def test_expr(expr, allowed_codes, mode: str = ...): ...
|
||||||
def const_eval(expr): ...
|
def const_eval(expr): ...
|
||||||
def safe_eval(expr, globals_dict: Optional[Any] = ..., locals_dict: Optional[Any] = ..., mode: str = ..., nocopy: bool = ..., locals_builtins: bool = ...): ...
|
def safe_eval(
|
||||||
|
expr,
|
||||||
|
globals_dict: Optional[Any] = ...,
|
||||||
|
locals_dict: Optional[Any] = ...,
|
||||||
|
mode: str = ...,
|
||||||
|
nocopy: bool = ...,
|
||||||
|
locals_builtins: bool = ...,
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ def table_kind(cr, tablename): ...
|
|||||||
def create_model_table(cr, tablename, comment: Optional[Any] = ...) -> None: ...
|
def create_model_table(cr, tablename, comment: Optional[Any] = ...) -> None: ...
|
||||||
def table_columns(cr, tablename): ...
|
def table_columns(cr, tablename): ...
|
||||||
def column_exists(cr, tablename, columnname): ...
|
def column_exists(cr, tablename, columnname): ...
|
||||||
def create_column(cr, tablename, columnname, columntype, comment: Optional[Any] = ...) -> None: ...
|
def create_column(
|
||||||
|
cr, tablename, columnname, columntype, comment: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
def rename_column(cr, tablename, columnname1, columnname2) -> None: ...
|
def rename_column(cr, tablename, columnname1, columnname2) -> None: ...
|
||||||
def convert_column(cr, tablename, columnname, columntype) -> None: ...
|
def convert_column(cr, tablename, columnname, columntype) -> None: ...
|
||||||
def set_not_null(cr, tablename, columnname): ...
|
def set_not_null(cr, tablename, columnname): ...
|
||||||
|
|||||||
@@ -1,8 +1,28 @@
|
|||||||
from . import config as config
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from . import config as config
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
_test_logger: Any
|
_test_logger: Any
|
||||||
|
|
||||||
def try_report(cr, uid, rname, ids, data: Optional[Any] = ..., context: Optional[Any] = ..., our_module: Optional[Any] = ..., report_type: Optional[Any] = ...): ...
|
def try_report(
|
||||||
def try_report_action(cr, uid, action_id, active_model: Optional[Any] = ..., active_ids: Optional[Any] = ..., wiz_data: Optional[Any] = ..., wiz_buttons: Optional[Any] = ..., context: Optional[Any] = ..., our_module: Optional[Any] = ...): ...
|
cr,
|
||||||
|
uid,
|
||||||
|
rname,
|
||||||
|
ids,
|
||||||
|
data: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
our_module: Optional[Any] = ...,
|
||||||
|
report_type: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
def try_report_action(
|
||||||
|
cr,
|
||||||
|
uid,
|
||||||
|
action_id,
|
||||||
|
active_model: Optional[Any] = ...,
|
||||||
|
active_ids: Optional[Any] = ...,
|
||||||
|
wiz_data: Optional[Any] = ...,
|
||||||
|
wiz_buttons: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
our_module: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ class PoFile:
|
|||||||
def next(self): ...
|
def next(self): ...
|
||||||
__next__: Any
|
__next__: Any
|
||||||
def write_infos(self, modules) -> None: ...
|
def write_infos(self, modules) -> None: ...
|
||||||
def write(self, modules, tnrs, source, trad, comments: Optional[Any] = ...) -> None: ...
|
def write(
|
||||||
|
self, modules, tnrs, source, trad, comments: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
def trans_export(lang, modules, buffer, format, cr) -> None: ...
|
def trans_export(lang, modules, buffer, format, cr) -> None: ...
|
||||||
def trans_parse_rml(de): ...
|
def trans_parse_rml(de): ...
|
||||||
@@ -68,8 +70,24 @@ def in_modules(object_name, modules): ...
|
|||||||
def _extract_translatable_qweb_terms(element, callback) -> None: ...
|
def _extract_translatable_qweb_terms(element, callback) -> None: ...
|
||||||
def babel_extract_qweb(fileobj, keywords, comment_tags, options): ...
|
def babel_extract_qweb(fileobj, keywords, comment_tags, options): ...
|
||||||
def trans_generate(lang, modules, cr): ...
|
def trans_generate(lang, modules, cr): ...
|
||||||
def trans_load(cr, filename, lang, verbose: bool = ..., module_name: Optional[Any] = ..., context: Optional[Any] = ...): ...
|
def trans_load(
|
||||||
def trans_load_data(cr, fileobj, fileformat, lang, lang_name: Optional[Any] = ..., verbose: bool = ..., module_name: Optional[Any] = ..., context: Optional[Any] = ...) -> None: ...
|
cr,
|
||||||
|
filename,
|
||||||
|
lang,
|
||||||
|
verbose: bool = ...,
|
||||||
|
module_name: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
): ...
|
||||||
|
def trans_load_data(
|
||||||
|
cr,
|
||||||
|
fileobj,
|
||||||
|
fileformat,
|
||||||
|
lang,
|
||||||
|
lang_name: Optional[Any] = ...,
|
||||||
|
verbose: bool = ...,
|
||||||
|
module_name: Optional[Any] = ...,
|
||||||
|
context: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
def get_locales(lang: Optional[Any] = ...) -> None: ...
|
def get_locales(lang: Optional[Any] = ...) -> None: ...
|
||||||
def resetlocale(): ...
|
def resetlocale(): ...
|
||||||
def load_language(cr, lang) -> None: ...
|
def load_language(cr, lang) -> None: ...
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from os import R_OK as R_OK, W_OK as W_OK
|
from os import R_OK as R_OK
|
||||||
|
from os import W_OK as W_OK
|
||||||
from os.path import dirname as dirname
|
from os.path import dirname as dirname
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
@@ -9,5 +10,7 @@ windows: Any
|
|||||||
seen: Any
|
seen: Any
|
||||||
defpathext: Any
|
defpathext: Any
|
||||||
|
|
||||||
def which_files(file, mode=..., path: Optional[Any] = ..., pathext: Optional[Any] = ...) -> None: ...
|
def which_files(
|
||||||
|
file, mode=..., path: Optional[Any] = ..., pathext: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
def which(file, mode=..., path: Optional[Any] = ..., pathext: Optional[Any] = ...): ...
|
def which(file, mode=..., path: Optional[Any] = ..., pathext: Optional[Any] = ...): ...
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
from odoo.tools.misc import file_open as file_open
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from odoo.tools.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 _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] = ...): ...
|
def create_xml_node_chain(
|
||||||
|
first_parent_node, nodes_list, last_node_value: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
def create_xml_node(parent_node, node_name, node_value: Optional[Any] = ...): ...
|
def create_xml_node(parent_node, node_name, node_value: Optional[Any] = ...): ...
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
from . import assertion_report as assertion_report, pycompat as pycompat, yaml_tag as yaml_tag
|
|
||||||
from .config import config as config
|
|
||||||
from .misc import DEFAULT_SERVER_DATETIME_FORMAT as DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT as DEFAULT_SERVER_DATE_FORMAT, file_open as file_open
|
|
||||||
from .safe_eval import safe_eval as safe_eval
|
|
||||||
from odoo import SUPERUSER_ID as SUPERUSER_ID
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from odoo 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
|
||||||
|
from .config import config as config
|
||||||
|
from .misc import DEFAULT_SERVER_DATE_FORMAT as DEFAULT_SERVER_DATE_FORMAT
|
||||||
|
from .misc import DEFAULT_SERVER_DATETIME_FORMAT as DEFAULT_SERVER_DATETIME_FORMAT
|
||||||
|
from .misc import file_open as file_open
|
||||||
|
from .safe_eval import safe_eval as safe_eval
|
||||||
|
|
||||||
unsafe_eval = eval
|
unsafe_eval = eval
|
||||||
_logger: Any
|
_logger: Any
|
||||||
|
|
||||||
@@ -46,7 +52,17 @@ class YamlInterpreter:
|
|||||||
eval_context: Any
|
eval_context: Any
|
||||||
env: Any
|
env: Any
|
||||||
sudo_env: Any
|
sudo_env: Any
|
||||||
def __init__(self, cr, module, id_map, mode, filename, report: Optional[Any] = ..., noupdate: bool = ..., loglevel=...) -> None: ...
|
def __init__(
|
||||||
|
self,
|
||||||
|
cr,
|
||||||
|
module,
|
||||||
|
id_map,
|
||||||
|
mode,
|
||||||
|
filename,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
loglevel=...,
|
||||||
|
) -> None: ...
|
||||||
def _log(self, *args, **kwargs) -> None: ...
|
def _log(self, *args, **kwargs) -> None: ...
|
||||||
def validate_xml_id(self, xml_id) -> None: ...
|
def validate_xml_id(self, xml_id) -> None: ...
|
||||||
def get_id(self, xml_id): ...
|
def get_id(self, xml_id): ...
|
||||||
@@ -62,10 +78,27 @@ class YamlInterpreter:
|
|||||||
def create_osv_memory_record(self, record, fields): ...
|
def create_osv_memory_record(self, record, fields): ...
|
||||||
def process_record(self, node) -> None: ...
|
def process_record(self, node) -> None: ...
|
||||||
_dict: Any
|
_dict: Any
|
||||||
def _create_record(self, model, fields, view_info: Optional[Any] = ..., parent=..., default: bool = ..., context: Optional[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_ref(self, node, field: Optional[Any] = ...): ...
|
||||||
def process_eval(self, node): ...
|
def process_eval(self, node): ...
|
||||||
def _eval_field(self, model, field_name, expression, view_info: bool = ..., parent=..., default: bool = ..., context: Optional[Any] = ...): ...
|
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_context(self, node) -> None: ...
|
||||||
def process_python(self, node) -> None: ...
|
def process_python(self, node) -> None: ...
|
||||||
def _eval_params(self, model, params): ...
|
def _eval_params(self, model, params): ...
|
||||||
@@ -81,5 +114,15 @@ class YamlInterpreter:
|
|||||||
def _process_node(self, node) -> None: ...
|
def _process_node(self, node) -> None: ...
|
||||||
def _log_node(self, node, is_preceded_by_comment): ...
|
def _log_node(self, node, is_preceded_by_comment): ...
|
||||||
|
|
||||||
def yaml_import(cr, module, yamlfile, kind, idref: Optional[Any] = ..., mode: str = ..., noupdate: bool = ..., report: Optional[Any] = ...) -> None: ...
|
def yaml_import(
|
||||||
|
cr,
|
||||||
|
module,
|
||||||
|
yamlfile,
|
||||||
|
kind,
|
||||||
|
idref: Optional[Any] = ...,
|
||||||
|
mode: str = ...,
|
||||||
|
noupdate: bool = ...,
|
||||||
|
report: Optional[Any] = ...,
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
convert_yaml_import = yaml_import
|
convert_yaml_import = yaml_import
|
||||||
|
|||||||
@@ -11,13 +11,17 @@ class Assert(YamlTag):
|
|||||||
id: Any
|
id: Any
|
||||||
severity: Any
|
severity: Any
|
||||||
string: Any
|
string: Any
|
||||||
def __init__(self, model, id: Optional[Any] = ..., severity=..., string: str = ..., **kwargs) -> None: ...
|
def __init__(
|
||||||
|
self, model, id: Optional[Any] = ..., severity=..., string: str = ..., **kwargs
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
class Record(YamlTag):
|
class Record(YamlTag):
|
||||||
model: Any
|
model: Any
|
||||||
id: Any
|
id: Any
|
||||||
view: Any
|
view: Any
|
||||||
def __init__(self, model, id, use: str = ..., view: bool = ..., **kwargs) -> None: ...
|
def __init__(
|
||||||
|
self, model, id, use: str = ..., view: bool = ..., **kwargs
|
||||||
|
) -> None: ...
|
||||||
def __str__(self): ...
|
def __str__(self): ...
|
||||||
|
|
||||||
class Python(YamlTag):
|
class Python(YamlTag):
|
||||||
|
|||||||
Reference in New Issue
Block a user