Problems searching by fields of type related

Bug #635102 reported by Albert Cervera i Areny - http://www.NaN-tic.com
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Medium
Unassigned

Bug Description

It's not possible to search with a domain like this if 'invoice_id' is of type fields.related: [('invoice_id','=',False)]

The problem is that at the function always returns a domain with the 'in' operator, but if the list of ids for 'in' is empty, ALL records match. What we really want is that NONE of them match.

The attached patch fixes the problem.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :
description: updated
Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

+1.

tottally agree.

I confirm the bug, i don't try the patch yet.

Regards.

Changed in openobject-server:
importance: Undecided → Medium
status: New → Confirmed
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.