-
- Downloads
[IMP] models: user-specified field aggregator in `read_group`
The caller of `read_group` can now provide the aggregating function to use for a given field: # set aggregating operator for fields 'foo' and 'bar' model.read_group(domain, ['foo:sum', 'bar:avg'], ...) One can also aggregate the same field several times, by giving a specific output name for each: # aggregate 'foo' with both 'min' and 'max' model.read_group(domain, ['foomin:min(foo)', 'foomax:max(foo)'], ...)
Showing
- odoo/addons/test_read_group/ir.model.access.csv 1 addition, 0 deletionsodoo/addons/test_read_group/ir.model.access.csv
- odoo/addons/test_read_group/models.py 11 additions, 0 deletionsodoo/addons/test_read_group/models.py
- odoo/addons/test_read_group/tests/test_group_operator.py 84 additions, 0 deletionsodoo/addons/test_read_group/tests/test_group_operator.py
- odoo/models.py 45 additions, 16 deletionsodoo/models.py
Loading
Please register or sign in to comment