我喜欢操作员在openerp 7中执行不同的操作

我喜欢操作员在openerp 7中执行不同的操作,openerp,Openerp,关于sql,我已经知道我喜欢操作员了。当放置在where类中时,它将以这种方式执行 'PSS01' ilike 'pss01' -> will return true 'PSS01' ilike '%ss01' -> will return true 'PSS01' ilike 'ss01' -> will return false 但在OpenERP7中,它是这样执行的 'PSS01' ilike 'pss01' -> returns true 'PSS01

关于sql,我已经知道我喜欢操作员了。当放置在where类中时,它将以这种方式执行

 'PSS01' ilike 'pss01' -> will return true
 'PSS01' ilike '%ss01' -> will return true
 'PSS01' ilike 'ss01' -> will return false
但在OpenERP7中,它是这样执行的

 'PSS01' ilike 'pss01' -> returns true
 'PSS01' ilike 'ss01' -> returns true **(it should return false)**
我的代码在下面

 repeted_ids = prod_serial_obj.search(cr, uid, ['&',('name', 'ilike', line.prod_ser_no),('product_id', '=', product_id)])

有人能帮忙吗?

OpenERP会自动将
ilike
运算符的右手值包装在百分比内。所以当你写域名的时候

[('name', 'ilike', 'ss01')]
OpenERP将其转换为

name ilike '%ss01%'
为了避免添加这些通配符,必须使用
=ilike
运算符

[('name', '=ilike', 'ss01')]
将转换为

name ilike 'ss01'