diff options
| author | Martin Geubelle <mge@odoo.com> | 2019-01-09 13:29:15 +0000 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2019-01-09 13:34:27 +0000 |
| commit | d682137884eb3edf232b12bfad3be0b16d3c45ba (patch) | |
| tree | 2957a55d064169aaf0e872725fbc0f3c803468bb /addons/web/static/src/js | |
| parent | c76066402ce473a3129168996af8cefda6834861 (diff) | |
[FIX] web: correctly export all records in list
Before this rev. a traceback occured when trying to export all records in a list
view.
An old reference to `searchView` was still present in the list controller, which
is not used anymore since the control panel refactoring (see odoo/odoo#29106).
Task 1917628
closes odoo/odoo#30073
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/list/list_controller.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/addons/web/static/src/js/views/list/list_controller.js b/addons/web/static/src/js/views/list/list_controller.js index fd5429d7c3e..dfa7d272a49 100644 --- a/addons/web/static/src/js/views/list/list_controller.js +++ b/addons/web/static/src/js/views/list/list_controller.js @@ -71,15 +71,9 @@ var ListController = BasicController.extend({ // TODO: this method should be synchronous... var self = this; if (this.$('thead .o_list_record_selector input').prop('checked')) { - var searchData = this.searchView.build_search_data(); - var userContext = this.getSession().user_context; - var results = pyUtils.eval_domains_and_contexts({ - domains: searchData.domains, - contexts: [userContext].concat(searchData.contexts), - group_by_seq: searchData.groupbys || [] - }); + var searchQuery = this._controlPanel ? this._controlPanel.getSearchQuery() : {}; var record = self.model.get(self.handle, {raw: true}); - return $.when(record.getDomain().concat(results.domain || [])); + return $.when(record.getDomain().concat(searchQuery.domain || [])); } else { return $.Deferred().resolve(); } |
