diff --git a/odoo-stubs/api.pyi b/odoo-stubs/api.pyi index 39769ad..4464ee7 100644 --- a/odoo-stubs/api.pyi +++ b/odoo-stubs/api.pyi @@ -71,7 +71,7 @@ class Environment(Mapping[str, BaseModel]): def __new__( cls, cr: Cursor, uid: int | None, context: dict, su: bool = ... ) -> Environment: ... - def __contains__(self, model_name: str) -> bool: ... + def __contains__(self, model_name) -> bool: ... def __getitem__(self, model_name: str) -> BaseModel: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... diff --git a/odoo-stubs/modules/module.pyi b/odoo-stubs/modules/module.pyi index 20bd06c..108545e 100644 --- a/odoo-stubs/modules/module.pyi +++ b/odoo-stubs/modules/module.pyi @@ -18,9 +18,8 @@ def get_module_path( ) -> str | Literal[False]: ... def get_module_filetree(module: str, dir: str = ...) -> dict: ... def get_resource_path(module: str, *args) -> str | Literal[False]: ... -def check_resource_path(mod_path: str, *args) -> str | Literal[False]: ... - get_module_resource = get_resource_path +check_resource_path = get_resource_path def get_resource_from_path(path: str) -> tuple[str, str, str] | None: ... def get_module_icon(module: str) -> str: ... diff --git a/odoo-stubs/tools/convert.pyi b/odoo-stubs/tools/convert.pyi index 6da3092..90ee120 100644 --- a/odoo-stubs/tools/convert.pyi +++ b/odoo-stubs/tools/convert.pyi @@ -4,7 +4,6 @@ from typing import Any, Callable, TextIO from lxml.etree import _Element from ..api import Environment -from .misc import ustr as ustr safe_eval: Callable @@ -31,6 +30,7 @@ class xml_import: def env(self) -> Environment: ... @property def noupdate(self) -> bool: ... + def next_sequence(self) -> int: ... mode: str module: str envs: list[Environment] diff --git a/odoo-stubs/tools/misc.pyi b/odoo-stubs/tools/misc.pyi index 81f5786..da151d1 100644 --- a/odoo-stubs/tools/misc.pyi +++ b/odoo-stubs/tools/misc.pyi @@ -293,6 +293,8 @@ class Unpickler(pickle_.Unpickler): pickle: ModuleType +class ReadonlyDict(Mapping): ... + class DotDict(dict): def __getattr__(self, attrib): ... diff --git a/odoo-stubs/tools/pdf.pyi b/odoo-stubs/tools/pdf.pyi index 7623d11..de31b12 100644 --- a/odoo-stubs/tools/pdf.pyi +++ b/odoo-stubs/tools/pdf.pyi @@ -17,6 +17,7 @@ class BrandedFileWriter(PdfFileWriter): PdfFileWriter = BrandedFileWriter def merge_pdf(pdf_data: Iterable[bytes]) -> bytes: ... +def fill_form_fields_pdf(document: bytes, form_fields: dict | None = ...) -> bytes: ... def rotate_pdf(pdf: bytes) -> bytes: ... def to_pdf_stream(attachment: IrAttachment) -> BytesIO: ... def add_banner(