diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-02-18 14:49:29 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-02-19 13:21:41 +0100 |
| commit | e5f184fe6d2ec8b5e121ded829830a95cd150627 (patch) | |
| tree | 30e8de0cbdb8ed1913b8bae45f3f155d6716e70b | |
| parent | 24158951f342ba1e81d22e9203c86c10355e8188 (diff) | |
[FIX] web: context/domain in move line tree
DO NOT FORWARD-PORT: the functionality is not used anymore in v9
Commit aaf9badb filters the returned ids by keeping the domain in the
request. However, `this.dataset.domain` might be empty, while
`self.dataset.get_domain()` will retrieve it from the model.
Since `get_domain` is not always defined on the dataset, we keep
`this.dataset.domain` as a fallback. The fix is not great, and a better
solution should be found in master branch when the web refactoring is
done.
opw-666755
| -rw-r--r-- | addons/web/static/src/js/view_list_editable.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 8c3f7d09ada..bc189313291 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -433,7 +433,8 @@ var self = this; var on_write_callback = self.fields_view.arch.attrs.on_write; if (!on_write_callback) { return $.when(); } - var context = new instance.web.CompoundContext(self.dataset.get_context(), {'on_write_domain': self.dataset.domain}).eval(); + var on_write_domain = typeof self.dataset.get_domain === "function" && self.dataset.get_domain() || self.dataset.domain; + var context = new instance.web.CompoundContext(self.dataset.get_context(), {'on_write_domain': on_write_domain}).eval(); return this.dataset.call(on_write_callback, [source_record.get('id'), context]) .then(function (ids) { return $.when.apply( |
