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:
@@ -64,11 +64,17 @@ class Environment(Mapping[str, BaseModel]):
|
|||||||
def manage(cls) -> Generator[None, None, None]: ...
|
def manage(cls) -> Generator[None, None, None]: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def reset(cls) -> None: ...
|
def reset(cls) -> None: ...
|
||||||
|
uid_origin: int | None
|
||||||
all: Environments
|
all: Environments
|
||||||
registry: Registry
|
registry: Registry
|
||||||
cache: Cache
|
cache: Cache
|
||||||
def __new__(
|
def __new__(
|
||||||
cls, cr: Cursor, uid: int, context: dict, su: bool = ...
|
cls,
|
||||||
|
cr: Cursor,
|
||||||
|
uid: int | None,
|
||||||
|
context: dict,
|
||||||
|
su: bool = ...,
|
||||||
|
uid_origin: int | None = ...,
|
||||||
) -> Environment: ...
|
) -> Environment: ...
|
||||||
def __contains__(self, model_name) -> bool: ...
|
def __contains__(self, model_name) -> bool: ...
|
||||||
def __getitem__(self, model_name: str) -> BaseModel: ...
|
def __getitem__(self, model_name: str) -> BaseModel: ...
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from typing import (
|
|||||||
import psycopg2
|
import psycopg2
|
||||||
from markupsafe import Markup
|
from markupsafe import Markup
|
||||||
|
|
||||||
|
from . import SUPERUSER_ID as SUPERUSER_ID
|
||||||
from .api import Environment, Registry
|
from .api import Environment, Registry
|
||||||
from .models import BaseModel
|
from .models import BaseModel
|
||||||
from .tools import date_utils, float_utils
|
from .tools import date_utils, float_utils
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ class BaseModel(metaclass=MetaModel):
|
|||||||
_needaction: bool
|
_needaction: bool
|
||||||
_translate: bool
|
_translate: bool
|
||||||
_check_company_auto: bool
|
_check_company_auto: bool
|
||||||
|
_allow_sudo_commands: bool
|
||||||
_depends: dict[str, Iterable[str]]
|
_depends: dict[str, Iterable[str]]
|
||||||
_transient_max_count: int
|
_transient_max_count: int
|
||||||
_transient_max_hours: float
|
_transient_max_hours: float
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from dateutil.relativedelta import relativedelta
|
|||||||
|
|
||||||
_DateTimeT = TypeVar("_DateTimeT", datetime.date, datetime.datetime)
|
_DateTimeT = TypeVar("_DateTimeT", datetime.date, datetime.datetime)
|
||||||
|
|
||||||
|
def date_type(value: _DateTimeT) -> type[_DateTimeT]: ...
|
||||||
def get_month(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
def get_month(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||||
def get_quarter_number(date: _DateTimeT) -> int: ...
|
def get_quarter_number(date: _DateTimeT) -> int: ...
|
||||||
def get_quarter(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
def get_quarter(date: _DateTimeT) -> Tuple[_DateTimeT, _DateTimeT]: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user