The usage of ``grouped_slice`` without size is deprecated since `=
ANY(ARRAY[%s])` is used for PostgreSQL and SQLite is used only for tests.
The ``Database.IN_MAX`` is replaced by ``backend.MAX_QUERY_PARAMS`` which is a
more accurate limit of the backend.
The SQLite limits is indeed SQLITE_MAX_EXPR_DEPTH so we use a empirical value.
This implements the same behavior as the payable/receivable date in
7caa97a96b95 ensuring that the cumulate balance is the same as the today field.
Also it allows to customize the date considered as today from the context date
key or _datetime (when browsing history).
Closes#14228