Discussion:
[Erp5-dev] Help in searching
Danny Admin
2009-01-23 19:36:09 UTC
Permalink
Hi,

I have a type named 'Property' which have a field property_area (in its form i defined it as my_property_area). Now when i search on it with the following script I got all the objects of Property instead of the property_area condition. Can anyone help how can i do it?

query = ComplexQuery(Query(property_area='5000.00'),
Query(portal_type = 'Property'),
operator="AND"))

propertyList = context.portal_catalog(query=query)

Also when i do it on 'title' field it worked as expected.

I also define a property sheet for Property type which have corresponding property named 'property_area'.

Regards
Danny

_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/events.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20090123/19f204c4/attachment.htm>
Danny Admin
2009-01-23 19:36:09 UTC
Permalink
Hi,

I have a type named 'Property' which have a field property_area (in its form i defined it as my_property_area). Now when i search on it with the following script I got all the objects of Property instead of the property_area condition. Can anyone help how can i do it?

query = ComplexQuery(Query(property_area='5000.00'),
Query(portal_type = 'Property'),
operator="AND"))

propertyList = context.portal_catalog(query=query)

Also when i do it on 'title' field it worked as expected.

I also define a property sheet for Property type which have corresponding property named 'property_area'.

Regards
Danny

_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/events.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20090123/19f204c4/attachment-0001.htm>
-------------- next part --------------

Loading...