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

Number being cast to string causes domain filter to be applied incorrectly #8

Closed
tiaanduplessis opened this issue Jan 27, 2021 · 3 comments

Comments

@tiaanduplessis
Copy link

Thank you for maintaining this package. When trying to apply a domain filter that has an integer value e.g.

odoo.searchRead(`hr.job`, {  company_id: 1 }, fields, params)

The typecasting to a string of the value happening (https://github.com/vettloffah/odoo-await/blob/master/lib/index.js#L252) leads to incorrect results being returned.

When removing this typecasting:

domainArray.push([`${key}`, '=', value]);

I receive the correct results.

If you are currently unable to assist with an update, I will be more than happy to create a PR.

@tiaanduplessis tiaanduplessis changed the title Number being cast to string causes Number being cast to string causes domain filter to be applied incorrectly Jan 27, 2021
@vettloffah
Copy link
Owner

vettloffah commented Jan 28, 2021 via email

@tiaanduplessis
Copy link
Author

Awesome! Thanks for the quick response 👍

@vettloffah
Copy link
Owner

Resolved with version 2.1.1 (somehow missed this in the last update)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants