how to search "phone" ilike "A" OR "mobile" ilike "A"?
fanha99 opened this issue · comments
hi,
I want to search a partner:
"phone" ilike "A" OR "mobile" ilike "A"?
You can use SearchRead
on res.partner
for searching for partner records based on phone
and / or mobile
or other fields.
for operators you can refer Available domain operators in Openerp / Odoo?
for "phone" ilike "A" OR "mobile" ilike "A"?. you can use phone
, mobile
or other fields. it depends on which field is getting used on your system for storing partner's contact number.
for exam:
Odoo.searchRead(model = "res.partner", fields = listOf(
"id", "name", "email", "company_name"
), domain = listOf(listOf("phone", "ilike", callnumber)), offset = 0, limit = 4, sort = "name ASC") {
with this exam I can search partner with the field "phone" is the same to callnumber
I want to check: field "phone" is the same to callnumber OR field "mobile" is the same to callnumber
listOf("|" , listOf("phone", "ilike", number), listOf("mobile", "ilike", number))
done, many thx