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