From 4f35579a508c51d39bea4298ad5cb63732003f95 Mon Sep 17 00:00:00 2001 From: Trinh Anh Ngoc Date: Fri, 29 Jul 2022 22:09:28 +0700 Subject: [PATCH] Update stubs for models.py Fix #12 --- odoo-stubs/models.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odoo-stubs/models.pyi b/odoo-stubs/models.pyi index 78c65ba..f0da156 100644 --- a/odoo-stubs/models.pyi +++ b/odoo-stubs/models.pyi @@ -190,7 +190,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): def fields_get(self, allfields: Optional[Any] = ..., attributes: Optional[Any] = ...): ... def get_empty_list_help(self, help: Any): ... def check_field_access_rights(self, operation: Any, fields: Any): ... - def read(self, fields: Optional[list[str]] = ..., load: str = ...): ... + def read(self, fields: Optional[list[str]] = ..., load: str = ...) -> list[dict[str, Any]]: ... def _read_format(self, fnames: Any, load: str = ...): ... def _fetch_field(self, field: Any) -> None: ... def _read(self, fields: list[str]): ... @@ -206,7 +206,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): def write(self, vals: dict[str, Any]): ... def _write(self, vals: dict[str, Any]): ... def create(self: _M, vals_list: list[dict[str, Any]] | dict[str, Any]) -> _M: ... - def _create(self, data_list: list[dict[str, Any]]): ... + def _create(self: _M, data_list: list[dict[str, Any]]) -> _M: ... def _compute_field_value(self, field: Any) -> None: ... def _parent_store_create(self) -> None: ... def _parent_store_update_prepare(self, vals: Any): ... @@ -262,7 +262,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): def with_prefetch(self: _M, prefetch_ids: Optional[Any] = ...) -> _M: ... def _update_cache(self, values: Any, validate: bool = ...): ... def _convert_to_record(self, values: Any): ... - def _convert_to_write(self, values: Any): ... + def _convert_to_write(self, values: dict[str, Any]) -> dict[str, Any]: ... def _mapped_func(self, func: Any): ... def mapped(self, func: Any): ... def _mapped_cache(self, name_seq: Any): ...