2014-10-09 76 views
1

我遇到了非区分大小写的问题ORM方法OpenERP。我搜索了重复的行数据库如下:不区分大小写在ORM搜索方法中openerp

duplicate_ids = sns_obj.search(cr, uid, [('country_id', '=', country_id), 
('keyword_list', '=', final_str), ('origin', '=', origin)]) 

我怎样才能在数据库中搜索,而无需关心区分大小写

Ex: in Country_ID, "Vietnam" = "vietnam" or something like that 

感谢

回答

2

解决您的问题是运营商ilike

duplicate_ids = sns_obj.search(cr, uid, [('country_id', 'ilike', country_id), 
('keyword_list', 'ilike', final_str), ('origin', 'ilike', origin)])