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

Asked by hbto [Vauxoo] http://www.vauxoo.com

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

Language:
English Edit question
Status:
Open
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kalpana Hemnani(SerpentCS) (khemnani-serpentcs) said :
#1

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,
Regards,
Kalpana Hemnani,
Serpent Consulting Services.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

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

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) said :
#3

A new MP has been submitted

https://code.launchpad.net/~vauxoo/openobject-server/trunk_field_property_searcheable-dev-hbto/+merge/204357

Can some one drop an eye in it,

Best Regards

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.