Update stubs

This commit is contained in:
Trinh Anh Ngoc
2021-11-09 21:50:12 +07:00
parent f7d1e5f769
commit 8012e016f0
5 changed files with 20 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
from . import api as api, fields as fields, models as models
from odoo.modules.registry import Registry
from odoo.tools.translate import _ as _
from .modules.registry import Registry
from .tools.translate import _ as _
from typing import Any
evented: bool

View File

@@ -1,7 +1,8 @@
from collections import Mapping
from typing import Any
from odoo.sql_db import Cursor
from .modules.registry import Registry
from .sql_db import Cursor
__all__: Any
_logger: Any
@@ -55,27 +56,25 @@ class Environment(Mapping):
cr: Cursor = ...
uid: int = ...
context: dict = ...
@classmethod
@property
def envs(cls) -> Environments: ...
envs: Environments = ...
@classmethod
def manage(cls) -> None: ...
@classmethod
def reset(cls) -> None: ...
registry: Any
registry: Registry
cache: Any
_protected: Any
dirty: Any
all: Any
def __new__(cls, cr, uid, context) -> Environment: ...
def __contains__(self, model_name): ...
all: Environments
def __new__(cls, cr: Cursor, uid, context) -> Environment: ...
def __contains__(self, model_name) -> bool: ...
def __getitem__(self, model_name): ...
def __iter__(self): ...
def __len__(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
def __call__(self, cr: Any | None = ..., user: Any | None = ..., context: Any | None = ...): ...
def __len__(self) -> int: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __hash__(self) -> int: ...
def __call__(self, cr: Cursor | None = ..., user: Any | None = ..., context: Any | None = ...) -> Environment: ...
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
@property
def user(self):

View File

@@ -1,7 +1,8 @@
import werkzeug.wsgi
import werkzeug.contrib.sessions
from typing import Any, Union
import werkzeug.contrib.sessions
import werkzeug.wsgi
from .api import Environment
from .modules.registry import Registry
from .sql_db import Cursor

View File

@@ -1,5 +1,6 @@
from collections import MutableMapping
from typing import Any, Generator, List
from . import api, fields
from .api import Environment
from .modules.registry import Registry

View File

@@ -1,6 +1,7 @@
import psycopg2.extensions
from typing import Any
import psycopg2.extensions
_logger: Any
types_mapping: Any