Skip to Content
Menu
This question has been flagged
2 Replies
2018 Views

Is there any way to search ALL fields when i type in the search bar? Possibly by modifying the res.partner.select view?

Avatar
Discard
Best Answer

Take a look at the XML for the res.partner.select view, specifically this line:

<field name="name" 
filter_domain="[
'|',
'|',
('display_name','ilike',self),
('ref','=',self),
('email','ilike',self)]"/>

It specifies that THREE fields will be searched at once. 

You can add to this, making sure there is N-1 OR statements - the '|' - before your N domains for the fields you want to search.

Avatar
Discard
Best Answer

Hello Patrick,

Try below link i think it's work for you.

        <record id="partner_search_view" model="ir.ui.view">
			<field name="name">res.partner.search.view</field>
			<field name="model">res.partner</field>
      			<field name="inherit_id" ref="base.view_res_partner_filter"/>
			<field name="arch" type="xml">
				<search>
					<field name="name"/>
					<field name="email"/>
					<field name="contact"/>
				</search>
			</field>
		</record>
 
Avatar
Discard