This question has been flagged
1 Reply
1587 Views

Hi,
I customized the crm form view add one many2one vendor_id (res.partner) ,
I want to search it by
self.env['crm.lead'].search([('vendor_id','ilike','test')])
but it's not working,
but predefined fields country_id is working,

self.env['crm.lead'].search([('country_id','ilike','India')])

Thanks 

Avatar
Discard
Author Best Answer

I added the name_search in res.partner ,
It's working,
If someone have any other way ,
Please tell  me.

Avatar
Discard

Hi,

i guess you should include .name in your search,

self.env['crm.lead'].search([('vendor_id.name','ilike','test')])

Thanks