upgrade-read-group-signature (U2021)#

read_group called with the 19.0 signature (lazy, orderby, fields).

Applies to Odoo 20.0 and later.

What it does#

Reports read_group(...) calls with lazy=, orderby= or fields=.

Why is this bad?#

Odoo 20.0 gave read_group the signature of _read_group: read_group(domain, groupby, aggregates, having, offset, limit, order), returning tuples with records instead of dicts. The old call fails or its result is misread; formatted_read_group returns the old dicts.