diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-02-25 10:40:33 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | db2198b7ef95cf15df705ac736f7481d0a61f66f (patch) | |
| tree | 4a1cf622d29a36872c7e724e9ebf29f8358cb42e /addons/web/static/src/js/_deprecated | |
| parent | 1a7fbd5a13fe8d9c6d47fb49204061b002240ac8 (diff) | |
[FIX] web: fix crash when building domain with dates
Before this commit, the rawify function assumed that any object is
necessary a record object. This was true until recently, when we
decided that dates should be internally stored as a moment instance.
Diffstat (limited to 'addons/web/static/src/js/_deprecated')
| -rw-r--r-- | addons/web/static/src/js/_deprecated/data.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/_deprecated/data.js b/addons/web/static/src/js/_deprecated/data.js index 791693bce67..f6a58367903 100644 --- a/addons/web/static/src/js/_deprecated/data.js +++ b/addons/web/static/src/js/_deprecated/data.js @@ -760,6 +760,9 @@ function rawify (data) { // replaces the value of relational fields by their raw value (the id, if // any, for many2ones and an array of ids for x2manys), in turn return _.mapObject(data, function (value) { + if (value instanceof moment) { + return moment; + } if (_.isObject(value)) { return value.type === 'record' ? value.res_id : value.res_ids; } |
