search a many2one field for > 0 returns an empty list

Bug #1128997 reported by Florent
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP's Framework R&D

Bug Description

We experienced a wrong behavior when searching for a many2one field with (..., '>', 0).

self.pool.get("res.partner").search(cr, uid, [('company_id', '>', 0)])
# ==> zero result

self.pool.get("res.partner").search(cr, uid, [('company_id', '>=', 0)])
# ==> zero result

self.pool.get("res.partner").search(cr, uid, [('company_id', '>', -1)])
# ==> 55 results

self.pool.get("res.partner").search(cr, uid, [('company_id', '>=', 1)])
# ==> 55 results

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Sunil Sharma(OpenERP) (sunil.sharma-openerp) wrote :

Hello,

It has been fixed into https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-1128997-sunil

branch with following

Revision ID: <email address hidden>
Revision No:4818

Thanks

Changed in openobject-server:
status: Confirmed → In Progress
Changed in openobject-server:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.