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

[IMP] orm: deprecated read_group #11354

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
2 changes: 1 addition & 1 deletion content/developer/reference/backend/orm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ Search/Read

.. automethod:: Model._read_group

.. automethod:: Model.read_group
.. automethod:: Model.search_read_group

Fields
~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions content/developer/reference/backend/orm/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Odoo Online version 18.1
- Declare constraints and indexes as model attributes with `#175783 <https://github.com/odoo/odoo/pull/175783>`_.
- The `json` controllers have been renamed to `jsonrpc`. They are called the same, only the
`type` in the python files changed. See `#183636 <https://github.com/odoo/odoo/pull/183636>`_.
- `read_group` has been deprecated in favor to the new API search_read_group or web_read_group if
formatted result is necessary. See `#163300 <https://github.com/odoo/odoo/pull/163300>`_.

Odoo version 18.0
=================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2053,9 +2053,7 @@ The `filter` element can have the following attributes:
the :guilabel:`Group By` menu. When the field is of type `date` or `datetime`, the filter
generates a submenu of the :guilabel:`Group By` menu with the following interval options
available: :guilabel:`Year`, :guilabel:`Quarter`, :guilabel:`Month`, :guilabel:`Week`, and
:guilabel:`Day`. When the filter is in the default set of filters activated at the view
initialization, the records are grouped by month by default. This can be changed by using the
syntax `date_field:interval`.
:guilabel:`Day`.

.. example::
.. code-block:: xml
Expand All @@ -2064,7 +2062,7 @@ The `filter` element can have the following attributes:
<filter string="Creation Date" name="groupby_create_date" context="{'group_by': 'create_date:week'}"/>

.. note::
The results of `read_groups` grouped on a field may be influenced by its `group_expand`
The results of `web_read_group` grouped on a field may be influenced by its `group_expand`
attribute, allowing to display empty groups when needed. For more information, please refer to
:class:`~odoo.fields.Field`.

Expand Down