how can I search a NULL value?

Asked by Cuong

Hi,

For example, in my model, containing field many2one such as partner_id. A lot of records contain NULL value of this field. In search view, how can I search those records with NULL value of partner_id?

Thank you very much,

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#1

Cuong,

For v6.0:
You should use advanced filter:
Many2on field - is equal to - _______

No value on the right operand.

Thanks.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#2

For v6.1:

The above-mentioned trick will work in GTK.

For web, this doesn't seem to work.

On the basis of consistency, this could be said as a bug.

Regards,
Serpent Consulting Services.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#3

Surprisingly, this works on web 6.1:

Many2one field - doesn't contain - _______

Thanks.

Revision history for this message
Cuong (bhcuong2008) said :
#4

Hi Serpent,

Could you tell me detail. You are using advanced filter? Without advance filters, in v6.0 for the web client, it will display 2 input widgets: one is "from value", another is "to value".

Please give me your advice so that we will report bug to openerp-web project.

Thanks,

Revision history for this message
Cuong (bhcuong2008) said :
#5

Sorry for mistake, this is another question, not related to this question.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#6

Hi Coung,

Without Advance filter, it is not possible to search null values by GUI.

Are you talking about date field of m2o?

For date, v6.0 has to and from filter, v6.1 has one.

Can you help with this problem?

Provide an answer of your own, or ask Cuong for more information if necessary.

To post a message you must log in.