Skip to content

Commit

Permalink
[IMP] orm: deprecated read_group
Browse files Browse the repository at this point in the history
  • Loading branch information
ryv-odoo committed Nov 12, 2024
1 parent d458c75 commit 526a988
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 526a988

Please sign in to comment.