summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2019-11-27 10:06:36 +0000
committerVictor Feyens <vfe@odoo.com>2019-11-27 10:06:36 +0000
commitc5398bd4bc84a4e2bce16eb22564c87073a28c30 (patch)
tree17af20cc3311c97b037278da81ccee3a12223530
parent7b75571fe85f88de66dd24e55ed014b088313be2 (diff)
[IMP] doc : group_operator field attribute
closes odoo/odoo#40944 X-original-commit: 7cbad14e28c50d51c14683d2548ea32ebc58907f Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
-rw-r--r--odoo/fields.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 414b36483c9..eb26110414e 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -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