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

[FIX] ir_property: Allows to search on boolean == False #43580

Conversation

@rousseldenis
Copy link
Contributor

rousseldenis commented Jan 20, 2020

Description of the issue/feature this PR addresses:

This is related to an oooold bug that does not allow to search False on boolean company_dependent fields.

See: #9449

Current behavior before PR:

The search does not work

Desired behavior after PR is merged:

The search is working

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

@robodoo robodoo added the seen 🙂 label Jan 20, 2020
@rousseldenis

This comment has been minimized.

@Yenthe666 Yenthe666 added the Framework label Jan 20, 2020
@robodoo robodoo added the CI 🤖 label Jan 20, 2020
@mart-e mart-e requested a review from xmo-odoo Jan 20, 2020
@rousseldenis

This comment has been minimized.

Copy link
Contributor Author

rousseldenis commented Jan 21, 2020

Forgot the inverse operator. Fixed

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Jan 21, 2020
@mart-e
mart-e approved these changes Jan 30, 2020
Copy link
Contributor

mart-e left a comment

LGTM, thanks
@simongoffin can you have a look as you have introduced the other conditions

@simongoffin simongoffin self-requested a review Feb 3, 2020
@rousseldenis

This comment has been minimized.

Copy link
Contributor Author

rousseldenis commented Feb 3, 2020

On its way to be merged ? 🎉

@mart-e

This comment has been minimized.

Copy link
Contributor

mart-e commented Feb 3, 2020

Sure!
Could you please squash the commits and improve a bit the commit message?
To explain what was the problem, why it needs this fix and adding a reference to the initial issue, as explained in the commit guidelines

rousseldenis added a commit to acsone/odoo that referenced this pull request Feb 3, 2020
Closes odoo#43580
Fixes odoo#9449

Adds field type conditions for boolean in search for Property model.

As False values are not stored in DB for boolean, the search() does
not return any value for non existent lines with:

* operator: '=' and value: False
* operator: '!=' and value: True

Uses the 'include_zero' and inverse operator mechanisms implmented
in Property model.
@rousseldenis rousseldenis force-pushed the acsone:master-fix-search_ir_property_false-dro branch from 56b09c6 to 4981171 Feb 3, 2020
@robodoo robodoo removed the CI 🤖 label Feb 3, 2020
Closes #43580
Fixes #9449

Adds field type conditions for boolean in search for Property model.

As False values are not stored in DB for boolean, the search() does
not return any value for non existent lines with:

* operator: '=' and value: False
* operator: '!=' and value: True

Uses the 'include_zero' and inverse operator mechanisms implemented
in Property model.
@rousseldenis rousseldenis force-pushed the acsone:master-fix-search_ir_property_false-dro branch from 4981171 to 4038cf0 Feb 3, 2020
@rousseldenis

This comment has been minimized.

Copy link
Contributor Author

rousseldenis commented Feb 3, 2020

@mart-e Done !

@mart-e

This comment has been minimized.

Copy link
Contributor

mart-e commented Feb 3, 2020

Great, thanks !

@robodoo r+

robodoo pushed a commit that referenced this pull request Feb 3, 2020
Closes #43580
Fixes #9449

Adds field type conditions for boolean in search for Property model.

As False values are not stored in DB for boolean, the search() does
not return any value for non existent lines with:

* operator: '=' and value: False
* operator: '!=' and value: True

Uses the 'include_zero' and inverse operator mechanisms implemented
in Property model.

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
@robodoo robodoo closed this Feb 3, 2020
@robodoo robodoo deployed to merge Feb 3, 2020 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.