From e5f184fe6d2ec8b5e121ded829830a95cd150627 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 18 Feb 2016 14:49:29 +0100 Subject: [PATCH] [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 --- addons/web/static/src/js/view_list_editable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(