ORM Search Method is not working properly on model with property fields

Asked by hbto [Vauxoo] http://www.vauxoo.com on 2011-12-28

when doing searches on a model which has property fields it returns the whole record for that model

Do this single test and you will realize about this bug.

# I will set id to a value which even doesnt exist and it will return the whole set of values for the model res.partner,
# the valid return value should be an empty list
id = 300000000
if context is None: context = {}
print self.pool.get('res.partner').search(cr, uid, [('property_account_payable','=', id)],context=context)

working on server revno. 3558.
Thanks for you help in advance

Question information

English Edit question
Odoo Server (MOVED TO GITHUB) Edit question
No assignee Edit question
Last query:
Last reply:

Hello hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha),

The "fields.property" class has the super class "fields.function". Hence it is necessary to define a member attribute "fnct_search" for the field definition to make it searchable. In case you have defined store=True, you won't need to define attribute "fnct_search".

Thank You,
Kalpana Hemnani,
Serpent Consulting Services.

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Can you help with this problem?

Provide an answer of your own, or ask hbto [Vauxoo] http://www.vauxoo.com for more information if necessary.

To post a message you must log in.