[IMP] doc : group_operator field attribute

closes odoo/odoo#40944

X-original-commit: 7cbad14e28c50d51c14683d2548ea32ebc58907f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2019-11-27 10:06:36 +00:00
parent 7b75571fe8
commit c5398bd4bc
+15
View File
@@ -165,6 +165,21 @@ class Field(MetaField('DummyField', (object,), {})):
:param bool store: whether the field is stored in database
(default:``True``, ``False`` for computed fields)
:param str group_operator: aggregate function used by :meth:`~odoo.models.Model.read_group`
when grouping on this field.
Supported aggregate functions are:
* ``array_agg`` : values, including nulls, concatenated into an array
* ``count`` : number of rows
* ``count_distinct`` : number of distinct rows
* ``bool_and`` : true if all values are true, otherwise false
* ``bool_or`` : true if at least one value is true, otherwise false
* ``max`` : maximum value of all values
* ``min`` : minimum value of all values
* ``avg`` : the average (arithmetic mean) of all values
* ``sum`` : sum of all values
.. rubric:: Computed Fields
:param str compute: name of a method that computes the field