From a6cb236155650e146ec10f89407b9b56b0d25029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20S=C3=B8rensen?= Date: Tue, 5 Mar 2024 14:39:11 +0100 Subject: [PATCH] [FIX] fields_get_keys not supported from Odoo v17.0 --- CHANGES.rst | 5 +++++ README.rst | 2 +- odooly.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0295b2f..c89473e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,11 @@ Changelog * Drop support for Python 3.4 +2.1.10 (202024-03-05) +~~~~~~~~~~~~~~~~~~ + +* Support for Odoo v17.0 - 'fields_get_key' not supported from v17.0 + 2.1.9 (2019-10-02) ~~~~~~~~~~~~~~~~~~ diff --git a/README.rst b/README.rst index c67aec6..827ba69 100644 --- a/README.rst +++ b/README.rst @@ -28,7 +28,7 @@ Odooly carries three completing uses: Key features: - provides an API very close to the Odoo API, through JSON-RPC and XML-RPC -- compatible with OpenERP 6.1 through Odoo 15.0 +- compatible with OpenERP 6.1 through Odoo 17.0 - single executable ``odooly.py``, no external dependency - helpers for ``search``, for data model introspection, etc... - simplified syntax for search ``domain`` and ``fields`` diff --git a/odooly.py b/odooly.py index e3e345e..bc808e5 100644 --- a/odooly.py +++ b/odooly.py @@ -34,7 +34,7 @@ except ImportError: requests = None -__version__ = '2.1.9' +__version__ = '2.1.10' __all__ = ['Client', 'Env', 'Service', 'BaseModel', 'Model', 'BaseRecord', 'Record', 'RecordList', 'format_exception', 'read_config', 'start_odoo_services'] @@ -1135,7 +1135,7 @@ def __repr__(self): return "" % (self._name,) def _get_keys(self): - obj_keys = self._execute('fields_get_keys') + obj_keys = list(self._execute('fields_get').keys()) if float(self.env.client.major_version) >= 17.0 else self._execute('fields_get_keys') obj_keys.sort() return obj_keys