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,7 +1,11 @@
|
|||||||
|
from collections import defaultdict
|
||||||
|
from weakref import WeakSet
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from odoo.modules.registry import Registry
|
||||||
from odoo.sql_db import Cursor
|
from odoo.sql_db import Cursor
|
||||||
|
from odoo.tools import StackMap
|
||||||
|
|
||||||
__all__: Any
|
__all__: Any
|
||||||
_logger: Any
|
_logger: Any
|
||||||
@@ -45,30 +49,28 @@ class Environment(Mapping):
|
|||||||
cr: Cursor = ...
|
cr: Cursor = ...
|
||||||
uid: int = ...
|
uid: int = ...
|
||||||
context: dict = ...
|
context: dict = ...
|
||||||
@classmethod
|
envs: Any
|
||||||
@property
|
|
||||||
def envs(cls) -> None: ...
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def manage(cls) -> None: ...
|
def manage(cls) -> None: ...
|
||||||
def reset(self) -> None: ...
|
def reset(self) -> None: ...
|
||||||
transaction: Any
|
transaction: Transaction
|
||||||
registry: Any
|
registry: Registry
|
||||||
cache: Any
|
cache: Cache
|
||||||
_cache_key: Any
|
_cache_key: Any
|
||||||
_protected: Any
|
_protected: Any
|
||||||
def __new__(cls, cr, uid, context, su: bool = ...) -> Environment: ...
|
def __new__(cls, cr: Cursor, uid, context, su: bool = ...) -> Environment: ...
|
||||||
def __contains__(self, model_name): ...
|
def __contains__(self, model_name): ...
|
||||||
def __getitem__(self, model_name): ...
|
def __getitem__(self, model_name): ...
|
||||||
def __iter__(self): ...
|
def __iter__(self): ...
|
||||||
def __len__(self): ...
|
def __len__(self) -> int: ...
|
||||||
def __eq__(self, other): ...
|
def __eq__(self, other) -> bool: ...
|
||||||
def __ne__(self, other): ...
|
def __ne__(self, other) -> bool: ...
|
||||||
def __hash__(self): ...
|
def __hash__(self) -> int: ...
|
||||||
def __call__(self, cr: Any | None = ..., user: Any | None = ..., context: Any | None = ..., su: Any | None = ...) -> Environment: ...
|
def __call__(self, cr: Any | None = ..., user: Any | None = ..., context: Any | None = ..., su: Any | None = ...) -> Environment: ...
|
||||||
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
|
def ref(self, xml_id, 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']
|
||||||
@@ -96,11 +98,11 @@ class Environment(Mapping):
|
|||||||
|
|
||||||
class Transaction:
|
class Transaction:
|
||||||
registry: Any
|
registry: Any
|
||||||
envs: Any
|
envs: WeakSet
|
||||||
cache: Any
|
cache: Cache
|
||||||
protected: Any
|
protected: StackMap
|
||||||
tocompute: Any
|
tocompute: defaultdict
|
||||||
towrite: Any
|
towrite: defaultdict
|
||||||
def __init__(self, registry): ...
|
def __init__(self, registry): ...
|
||||||
def flush(self) -> None: ...
|
def flush(self) -> None: ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import psycopg2.extensions
|
import psycopg2.extensions
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from odoo.api import Transaction
|
||||||
from odoo.tools import Callbacks
|
from odoo.tools import Callbacks
|
||||||
|
|
||||||
_logger: Any
|
_logger: Any
|
||||||
@@ -22,7 +23,7 @@ class BaseCursor:
|
|||||||
postcommit: Callbacks
|
postcommit: Callbacks
|
||||||
prerollback: Callbacks
|
prerollback: Callbacks
|
||||||
postrollback: Callbacks
|
postrollback: Callbacks
|
||||||
transaction: Any
|
transaction: Transaction
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
def flush(self) -> None: ...
|
def flush(self) -> None: ...
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user