Skip to Content
Menu
This question has been flagged
1 Reply
1856 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

Related Posts Replies Views Activity
3
Nov 24
1840
2
Nov 24
254
2
Jun 24
518
2
Jan 24
5010
1
Nov 23
762