When I start typing in the search box of my contact list OpenERP suggests me companies that contain the letters I have already typed. How can add other fields like for e.g. city to this autocomplete functionality?
I already created the following inherited view
<?xml version="1.0"?>
<filter string="Country" position="after">
<filter string="City" context="{'group_by': 'city'}"/>
<field name="street" filter_domain="[('street','ilike',self)]"/>
<field name="zip" filter_domain="[('zip','ilike',self)]"/>
<field name="city" filter_domain="[('city','ilike',self)]"/>
<field name="comment" filter_domain="[('comment','ilike',self)]"/>
</filter>
This allows to search the fields street, zip, city and comment. But you have to select manually that you want to search in this field. It not automatically suggests you content from this fields. For example when I type in "Brux" I can selext to search for "Brux" in the city field but it does not suggest me "Bruxelles". If I would have a company in the database with the name "Bruxelles Best S.A." it would automatically suggest me this company.
Here is an example. I type "Bru" in the search view and it suggest me two companies that contain "bru". I want the same suggestion for the city.
Note that it's not suggesting "Companies", it's suggesting "Related Companies" (
parent_id
many2one field). You would have the same effect for "City" if it were a many2one instead of a text box. You can confirm this by adding the "country_id" field to the Search View: since it's a many2one, it will show expanded descriptions.