Odoo Help


Search problem with Time Zone UTC-5

on 9/11/14, 6:33 PM 1,250 views


I've encountered a problem when trying to do a search for obtain records that are current day.

        fecha_actual= datetime.strptime(fields.date.context_today(self,cr,uid,context=context), "%Y-%m-%d").date()
        fecha_actual = fecha_actual.strftime('%Y-%m-%d')

         ingresos = self.search(cr, uid, [('f_ingreso', '>=', fecha_actual+' 00:00:00'),('f_ingreso','<=',fecha_actual+ ' 23:59:59')],context=context)

In trying to make the search only brings back those before 7:00 PM; as if I had my time zone into account for the search.Any idea what might be going?


It depends on where you are trying to make this search. Please post the entire object

GH Mediacloud, Grover Menacho
on 9/11/14, 6:49 PM

It is a proper model "system.poblacion_ingreso" within the have a button that should make finding records all day. _name = 'delphos.poblacion_ingreso' def check_current_day(self,cr,uid,ids,context=None): fecha_actual= datetime.strptime(fields.date.context_today(self,cr,uid,context=context), "%Y-%m-%d").date() fecha_actual = fecha_actual.strftime('%Y-%m-%d') ingresos = self.search(cr, uid, [('f_ingreso', '>=', fecha_actual+' 00:00:00'),('f_ingreso','

on 9/11/14, 10:21 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/11/14, 6:33 PM
Seen: 1250 times
Last updated: 3/16/15, 8:10 AM