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

Bug #909239 reported by hbto [Vauxoo] http://www.vauxoo.com

This bug report was converted into a question: question #195376: ORM Search Method is not working properly on model with property fields.

36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

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

Tags: maintenance

Related branches

Nhomar - Vauxoo (nhomar)
Changed in openobject-server:
status: New → Confirmed
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Hello guys,

Can somebody says something about the status of this bug?

Thanks,

Revision history for this message
Kalpana Hemnani(SerpentCS) (khemnani-serpentcs) wrote :

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.

Changed in openobject-server:
status: Confirmed → Invalid
tags: added: maintenance
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

For all those of you who have been affected by this issue,

We have a PoC, that you would be interested into test.

please feel free to test it, and we will appreciate your comments

http://bazaar.launchpad.net/~vauxoo/openobject-server/7.0_field_property_searcheable-dev-hbto/revision/5111

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

I am opening again this bug in order to address it in the trunk of openerp with
the MP that I have just made,

Best regards

Changed in openobject-server:
status: Invalid → New
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

This would spare us tens of ugly workarounds, mike having to filter browse records in python.

Changed in openobject-server:
status: New → Confirmed
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote : Re: [Bug 909239] Re: ORM Search Method is not working properly on model with property fields

Please Guys can you follow this thread too,
Searchable Property Fields by Default

Best regards

2014-02-02 Lionel Sausin - Numérigraphe <email address hidden>:

> This would spare us tens of ugly workarounds, mike having to filter
> browse records in python.
>
> ** Changed in: openobject-server
> Status: New => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/909239
>
> Title:
> ORM Search Method is not working properly on model with property
> fields
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/909239/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

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