mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
Update stubs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from . import addons as addons, api as api, cli as cli, conf as conf, fields as fields, http as http, loglevels as loglevels, models as models, netsvc as netsvc, osv as osv, release as release, service as service, sql_db as sql_db, tools as tools, upgrade as upgrade
|
||||
from odoo.tools.translate import _ as _, _lt as _lt
|
||||
from .tools.translate import _ as _, _lt as _lt
|
||||
from typing import Any, Optional
|
||||
|
||||
__path__: Any
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
from collections import Mapping
|
||||
from weakref import WeakSet
|
||||
from collections import Mapping, defaultdict
|
||||
from copy import deepcopy as deepcopy
|
||||
from decorator import decorator as decorator
|
||||
from typing import Any, Optional
|
||||
|
||||
from odoo.sql_db import Cursor
|
||||
from .modules.registry import Registry
|
||||
from .sql_db import Cursor
|
||||
from .tools import StackMap
|
||||
|
||||
__all__: Any
|
||||
_logger: Any
|
||||
@@ -46,29 +49,28 @@ class Environment(Mapping):
|
||||
uid: int = ...
|
||||
context: dict = ...
|
||||
su: bool = ...
|
||||
@property
|
||||
def envs(cls) -> Environments: ...
|
||||
envs: Environments = ...
|
||||
@classmethod
|
||||
def manage(cls) -> None: ...
|
||||
@classmethod
|
||||
def reset(cls) -> None: ...
|
||||
registry: Any = ...
|
||||
cache: Any = ...
|
||||
registry: Registry = ...
|
||||
cache: Cache = ...
|
||||
_protected: Any = ...
|
||||
all: Any = ...
|
||||
def __new__(cls, cr: Any, uid: Any, context: Any, su: bool = ...) -> Environment: ...
|
||||
def __contains__(self, model_name: Any): ...
|
||||
all: Environments = ...
|
||||
def __new__(cls, cr: Cursor, uid: Any, context: Any, su: bool = ...) -> Environment: ...
|
||||
def __contains__(self, model_name: Any) -> bool: ...
|
||||
def __getitem__(self, model_name: Any): ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __len__(self): ...
|
||||
def __eq__(self, other: Any) -> Any: ...
|
||||
def __ne__(self, other: Any) -> Any: ...
|
||||
def __hash__(self) -> Any: ...
|
||||
def __call__(self, cr: Optional[Any] = ..., user: Optional[Any] = ..., context: Optional[Any] = ..., su: Optional[Any] = ...) -> Environment: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __call__(self, cr: Optional[Cursor] = ..., user: Optional[Any] = ..., context: Optional[Any] = ..., su: Optional[Any] = ...) -> Environment: ...
|
||||
def ref(self, xml_id: Any, raise_if_not_found: bool = ...): ...
|
||||
def is_superuser(self): ...
|
||||
def is_admin(self): ...
|
||||
def is_system(self): ...
|
||||
def is_superuser(self) -> bool: ...
|
||||
def is_admin(self) -> bool: ...
|
||||
def is_system(self) -> bool: ...
|
||||
@property
|
||||
def user(self):
|
||||
return self['res.users']
|
||||
@@ -94,11 +96,11 @@ class Environment(Mapping):
|
||||
def norecompute(self) -> None: ...
|
||||
|
||||
class Environments:
|
||||
envs: Any = ...
|
||||
cache: Any = ...
|
||||
protected: Any = ...
|
||||
tocompute: Any = ...
|
||||
towrite: Any = ...
|
||||
envs: WeakSet = ...
|
||||
cache: Cache = ...
|
||||
protected: StackMap = ...
|
||||
tocompute: defaultdict = ...
|
||||
towrite: defaultdict = ...
|
||||
def __init__(self): ...
|
||||
def add(self, env: Any) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
from typing import Any, Optional
|
||||
|
||||
from odoo.tools import date_utils
|
||||
from .tools import date_utils
|
||||
|
||||
DATE_LENGTH: Any
|
||||
DATETIME_LENGTH: Any
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import werkzeug.wsgi
|
||||
import werkzeug.contrib.sessions
|
||||
from datetime import date as date
|
||||
|
||||
from odoo import fields as fields
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from odoo.api import Environment
|
||||
from odoo.sql_db import Cursor
|
||||
from . import fields as fields
|
||||
from .api import Environment
|
||||
from .sql_db import Cursor
|
||||
|
||||
_logger: Any
|
||||
rpc_request: Any
|
||||
|
||||
@@ -2,9 +2,9 @@ import collections
|
||||
import unittest
|
||||
from typing import Any, Optional
|
||||
|
||||
from odoo.api import Environment
|
||||
from odoo.modules.registry import Registry
|
||||
from odoo.sql_db import Cursor
|
||||
from ..api import Environment
|
||||
from ..modules.registry import Registry
|
||||
from ..sql_db import Cursor
|
||||
|
||||
_logger: Any
|
||||
ADDONS_PATH: Any
|
||||
|
||||
Reference in New Issue
Block a user