← Back to team overview

openerp-community team mailing list archive

How to use datetime + timedelta on odoo filters



When a company works in a timezone different from GMT, filters by datetime
get screwed up.

If user timezone is GMT-6:00, then any of current "Today" filters will
filter only records from tomorrow if current local time is after 18:00
 (18:00 + 6:00 = 24:00 -->> next day).

I was trying to adjust for that replacing time.strftime('%Y-%m-%d') with


as all records created today after 18:00 will have a database timestamp of

Problem is JS complains about invalid operands for "+": datetime and

Any idea how could this be acomplished ?


Follow ups