Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] fields_get_keys not supported from Odoo v17.0 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
4 changes: 2 additions & 2 deletions odooly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def __repr__(self):
return "<Model '%s'>" % (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

Expand Down