[FIX] account: Fix Journal Dashboard Running balance query
On Database having a postgresql server version superior or
equals than 14.0, a feature called memoization is caching
result of the lateral join made in this query.
This cache creates an issue that results that customers
have the same result for their bank journals.
By adding a LIMIT 1 at the end of the lateral join query,
the memoization is not enabled (according to query plan).
Another solution could be to change the condition of this
lateral join (currently ON True) for a condition on the
journal id but it was less efficient.
opw-3422495
closes odoo/odoo#136161
Signed-off-by:
William André (wan) <wan@odoo.com>
Please register or sign in to comment