How to do compare ignoring case in search filter? For instance in the below code
ids = self.pool.get('product.product').search(cr, uid, [('name', '=', 'Service'))], context=context)
i am comparing the name of the product with string 'Service'. i want to compare ignoring its case something similar to below
ids = self.pool.get('product.product').search(cr, uid, [('name'.upper(), '=', 'Service'.upper()))], context=context)
I can use 'service'.upper but not 'name'.upper. So how do i compare ignoring its case. Thanks for your time.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 5/22/13, 6:52 AM|
|Seen: 1326 times|
|Last updated: 3/16/15, 8:10 AM|