Skip to content
Merged
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
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Changelog
2.5.x (unreleased)
~~~~~~~~~~~~~~~~~~

* Odoo 19 and beyond: add documentation when using Web API
or Json2 API. Stored on :attr:`Model._doc` attribute.

* Odoo 19 and beyond: list methods and arguments with
:meth:`Model._methods` or :meth:`RecordList._methods`.

* Support HTTP Basic Authentication in URL, for example
``odooly https://user:password@host.example.net/``.

Expand Down
26 changes: 26 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ Example: ``client.env['res.company']`` returns a :class:`Model`.

.. automethod:: _get_external_ids

.. automethod:: _methods([name])

..
search count read ...
write copy unlink
Expand Down Expand Up @@ -391,6 +393,10 @@ Example: ``client.env['res.company']`` returns a :class:`Model`.

Same as :meth:`Record.get_metadata` method.

.. method:: _methods([name])

Same as :meth:`Model._methods` method.

.. attribute:: _external_id

Retrieve the External IDs of the :class:`RecordList`.
Expand All @@ -399,6 +405,14 @@ Example: ``client.env['res.company']`` returns a :class:`Model`.
the :class:`RecordList`, with default value False if there's none.
If multiple IDs exist for a record, only one of them is returned.

.. attribute:: _keys

Return list of field names.

.. attribute:: _fields

Return a dictionary of the fields.

.. autoclass:: Record(model, id)
:members: read, write, copy, unlink, _send, _external_id, refresh
:undoc-members:
Expand All @@ -418,6 +432,18 @@ Example: ``client.env['res.company']`` returns a :class:`Model`.
* ``xmlid``: External ID to use to refer to this record (if there is one),
in format ``module.name``.

.. method:: _methods([name])

Same as :meth:`Model._methods` method.

.. attribute:: _keys

Return list of field names.

.. attribute:: _fields

Return a dictionary of the fields.


Utilities
---------
Expand Down
Loading