sale.order.line对象有一个many2many字段options,可以这样来搜索:
oids = self.pool.get('custom.option').search(cr, uid, [('name', 'ilike', 'to-search-name')])
soids = self.pool.get('sale.order.line').search(cr, uid, [('id', '=', line.id),('options', 'in', oids)])
感谢达人Mrshelly!