From 41155bd5caf4b2f4e75f73a09e35e5f7290ca1f8 Mon Sep 17 00:00:00 2001 From: Trinh Anh Ngoc Date: Fri, 29 Jul 2022 21:45:27 +0700 Subject: [PATCH] Update stubs for models.py Fix #12 --- odoo-stubs/models.pyi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/odoo-stubs/models.pyi b/odoo-stubs/models.pyi index fafb50c..32dca71 100644 --- a/odoo-stubs/models.pyi +++ b/odoo-stubs/models.pyi @@ -182,9 +182,9 @@ 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[Any] = ..., load: str = ...): ... + def read(self, fields: Optional[list[str]] = ..., load: str = ...): ... def _fetch_field(self, field: Any) -> None: ... - def _read(self, fields: Any): ... + def _read(self, fields: list[str]): ... def get_metadata(self): ... def get_base_url(self): ... def _check_concurrency(self) -> None: ... @@ -194,10 +194,10 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): def _filter_access_rules(self, operation: Any): ... def _filter_access_rules_python(self, operation: Any): ... def unlink(self): ... - def write(self, vals: Any): ... - def _write(self, vals: Any): ... - def create(self: _M, vals_list: Any) -> _M: ... - def _create(self, data_list: Any): ... + 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 _compute_field_value(self, field: Any) -> None: ... def _parent_store_create(self) -> None: ... def _parent_store_update_prepare(self, vals: Any): ...