odoo/odoo#163438

Created by fw-bot
label
odoo-dev:saas-16.4-16.0-fix-account-functions-lul-VFtg-fw
head
9251819cfe6749279ccec6bfd50276e0ac35fca0
target
saas-16.4
merged
3 weeks ago by BI, Lucas Lefèvre (lul)
forward-port of
odoo/odoo#163165

[FW][FIX] spreadsheet_account: fix no account match

Steps to reproduce:
- create an empty spreadsheet
- type in a cell '=ODOO.BALANCE("qsdfqsf", "02/2024")' => #ERROR

There's no account that match the given code.
The account.move.line domain ends up having a clause `('account_id', 'in', [])`
The ORM detects the domain won't match anything and early returns an empty list []

Our code expects a query object and not a list => boom


---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: odoo/odoo#163165