summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-04-13 14:39:14 +0200
committerOlivier Dony <odo@openerp.com>2015-04-23 14:05:56 +0200
commit76881fb2262c9fcfc306c8b1f6d2394b402d0ce1 (patch)
treefcd10c16b596f27ed8ea696a7b503e8aaf8c74fc /addons/web/static/src/xml/base.xml
parent5267e3a158cab4515d65b652435c7350030be50b (diff)
[FIX] web: backport datetime.toJSON() so we can return local datetimes in search domains
This fix adds the toJSON() method to datetime.datetime, so domain expressions can use datetime values directly, without having to compute the stringified version with convoluted strftime() and timezone calculations. The datetime results are sent down to the JSON-RPC level where the JSON.stringify() serialization will convert them to UTC string, to be deserialized properly as UTC datetime values on the server side. Thanks to this we can use the browser's local midnight timestamp in a filter expression, for example like this: `datetime.datetime.combine(context_today(), datetime.time(0,0,0))` and get the expected result regardless of the user/browser's timezone. related to issue #2972 and pull request #2914 and #6229 (Next commit will fix them) opw-621282
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions