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 . 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
|
from typing import Any, Optional
|
||||||
|
|
||||||
__path__: Any
|
__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 copy import deepcopy as deepcopy
|
||||||
from decorator import decorator as decorator
|
from decorator import decorator as decorator
|
||||||
from typing import Any, Optional
|
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
|
__all__: Any
|
||||||
_logger: Any
|
_logger: Any
|
||||||
@@ -46,29 +49,28 @@ class Environment(Mapping):
|
|||||||
uid: int = ...
|
uid: int = ...
|
||||||
context: dict = ...
|
context: dict = ...
|
||||||
su: bool = ...
|
su: bool = ...
|
||||||
@property
|
envs: Environments = ...
|
||||||
def envs(cls) -> Environments: ...
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def manage(cls) -> None: ...
|
def manage(cls) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def reset(cls) -> None: ...
|
def reset(cls) -> None: ...
|
||||||
registry: Any = ...
|
registry: Registry = ...
|
||||||
cache: Any = ...
|
cache: Cache = ...
|
||||||
_protected: Any = ...
|
_protected: Any = ...
|
||||||
all: Any = ...
|
all: Environments = ...
|
||||||
def __new__(cls, cr: Any, uid: Any, context: Any, su: bool = ...) -> Environment: ...
|
def __new__(cls, cr: Cursor, uid: Any, context: Any, su: bool = ...) -> Environment: ...
|
||||||
def __contains__(self, model_name: Any): ...
|
def __contains__(self, model_name: Any) -> bool: ...
|
||||||
def __getitem__(self, model_name: Any): ...
|
def __getitem__(self, model_name: Any): ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Any: ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def __eq__(self, other: Any) -> Any: ...
|
def __eq__(self, other: Any) -> bool: ...
|
||||||
def __ne__(self, other: Any) -> Any: ...
|
def __ne__(self, other: Any) -> bool: ...
|
||||||
def __hash__(self) -> Any: ...
|
def __hash__(self) -> int: ...
|
||||||
def __call__(self, cr: Optional[Any] = ..., user: Optional[Any] = ..., context: Optional[Any] = ..., su: Optional[Any] = ...) -> Environment: ...
|
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 ref(self, xml_id: Any, raise_if_not_found: bool = ...): ...
|
||||||
def is_superuser(self): ...
|
def is_superuser(self) -> bool: ...
|
||||||
def is_admin(self): ...
|
def is_admin(self) -> bool: ...
|
||||||
def is_system(self): ...
|
def is_system(self) -> bool: ...
|
||||||
@property
|
@property
|
||||||
def user(self):
|
def user(self):
|
||||||
return self['res.users']
|
return self['res.users']
|
||||||
@@ -94,11 +96,11 @@ class Environment(Mapping):
|
|||||||
def norecompute(self) -> None: ...
|
def norecompute(self) -> None: ...
|
||||||
|
|
||||||
class Environments:
|
class Environments:
|
||||||
envs: Any = ...
|
envs: WeakSet = ...
|
||||||
cache: Any = ...
|
cache: Cache = ...
|
||||||
protected: Any = ...
|
protected: StackMap = ...
|
||||||
tocompute: Any = ...
|
tocompute: defaultdict = ...
|
||||||
towrite: Any = ...
|
towrite: defaultdict = ...
|
||||||
def __init__(self): ...
|
def __init__(self): ...
|
||||||
def add(self, env: Any) -> None: ...
|
def add(self, env: Any) -> None: ...
|
||||||
def __iter__(self) -> Any: ...
|
def __iter__(self) -> Any: ...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from odoo.tools import date_utils
|
from .tools import date_utils
|
||||||
|
|
||||||
DATE_LENGTH: Any
|
DATE_LENGTH: Any
|
||||||
DATETIME_LENGTH: Any
|
DATETIME_LENGTH: Any
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import werkzeug.wsgi
|
import werkzeug.wsgi
|
||||||
import werkzeug.contrib.sessions
|
import werkzeug.contrib.sessions
|
||||||
from datetime import date as date
|
from datetime import date as date
|
||||||
|
|
||||||
from odoo import fields as fields
|
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
|
||||||
from odoo.api import Environment
|
from . import fields as fields
|
||||||
from odoo.sql_db import Cursor
|
from .api import Environment
|
||||||
|
from .sql_db import Cursor
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
rpc_request: Any
|
rpc_request: Any
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import collections
|
|||||||
import unittest
|
import unittest
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from odoo.api import Environment
|
from ..api import Environment
|
||||||
from odoo.modules.registry import Registry
|
from ..modules.registry import Registry
|
||||||
from odoo.sql_db import Cursor
|
from ..sql_db import Cursor
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
ADDONS_PATH: Any
|
ADDONS_PATH: Any
|
||||||
|
|||||||
Reference in New Issue
Block a user