Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 25, 2024

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: #163165

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

opw-3872445

X-original-commit: 95de133
@robodoo
Copy link
Contributor

robodoo commented Apr 25, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 25, 2024

This PR targets saas-16.4 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 25, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 25, 2024
robodoo pushed a commit that referenced this pull request Apr 26, 2024
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

opw-3872445

closes #163438

X-original-commit: 95de133
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants