Merge lp:~openerp-dev/openerp-web/7.0-opw-591255-msh into lp:openerp-web/7.0
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openerp-web/7.0-opw-591255-msh |
Merge into: | lp:openerp-web/7.0 |
Diff against target: |
27 lines (+10/-0) 1 file modified
addons/web/static/src/js/pyeval.js (+10/-0) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/7.0-opw-591255-msh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavier (Open ERP) (community) | Needs Fixing | ||
Martin Trigaux (OpenERP) | Pending | ||
Nicolas Vanhoren (OpenERP) | Pending | ||
Review via email: mp+158867@code.launchpad.net |
Description of the change
Hello,
Fixed the issue of datetime.date.today and datetime.
Demo:- To reproduce this issue create one search filter for date field as follow.
<filter icon="terp-
Or create for datetime field as follow.
<filter icon="terp-
Noe goto search view and click on this filter and you will get error results.group_by is undefined.
Reason: today is not supported by datetime.date or datetime.datetime object(pyeval.js helper of py.js), as python datetime.datetime object has today method which gives localtime without tz information so we should support this as server addons developer will put domain by considering python.
Thanks.
Unmerged revisions
- 3892. By Mohammed Shekha<email address hidden>
-
[FIX]Fixed the issue of datetime.date.today and datetime.
datetime. today which is not supported by pyeval, so add today method to allow developed to use datetime. date.today, as server addons developer will always write a code in terms of python(by thinking python's datetime. datetime. today method).
* Why doesn't datetime. datetime. today just call datetime. datetime. now since they're equivalent if timezones aren't supported?
* I expect the whole point of context_today is that using date.today is *wrong*. If that's the case, it definitely should not be added. Though you'll have to check that with niv.