Skip to content

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

@tiaanduplessis

Description

@tiaanduplessis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions