summaryrefslogtreecommitdiff
path: root/odoo/tools
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2020-06-02 15:03:52 +0000
committerJulien Mougenot <jum@odoo.com>2020-07-14 09:10:32 +0000
commit669c2ebaec701055a15dc56ea90bf2d64bc38154 (patch)
tree6711c374432f030d3c375825b65943cdc0186bdc /odoo/tools
parentb9ad60d5ebe73ee47eba64145ebe27d483a7f33a (diff)
[IMP] web: improve eval context dates
This commit handles 2 things: 1) the merging of the `py_utils.context()` into the evaluation context returned by `BasicModel._getEvalContext` to access the same time-related keys, 2) the addition of 2 new keys into the `py_utils.context` (thus transmitted to the basic model): `today` (an alias for the already present `current_date`) and `now` which represents the current date and time value. Task 2269697
Diffstat (limited to 'odoo/tools')
-rw-r--r--odoo/tools/view_validation.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/tools/view_validation.py b/odoo/tools/view_validation.py
index 6a20044f939..61202fb6b61 100644
--- a/odoo/tools/view_validation.py
+++ b/odoo/tools/view_validation.py
@@ -36,6 +36,8 @@ def _get_attrs_symbols():
'datetime',
'relativedelta',
'current_date',
+ 'today',
+ 'now',
'abs',
'len',
'bool',