I have a date field in this format: "17/01/2013" and I'm trying to use the ORM search function to find all records that match a certain year say 2012 for instance.
I've tried something like this but it didnt work:
my_obj.search(cr, uid, [('date', '>=', '01/01/' + h1.year), ('date', '<=', '31/12/' + h1.year)], order='date')
but it didn't work.
How can I achieve this with the ORM search function? More general, how can I construct a query to search for all records matching a specified year using a date field in the format shown above?