[FIX] web: traceback when exporting from list view

Former code of list controller used the searchView of its parent,
which was the ViewManager. However, this has been changed by rev.
32b8cec53, where the ViewManager was removed, and the list
controller now has the reference of the searchView, so this code
had to be adapted. Tests have been adapted accordingly as well.
This commit is contained in:
Priyanka Kakadiya
2018-01-22 08:28:44 +01:00
committed by Aaron Bohy
parent 6c211376f0
commit 33d43c5af1
2 changed files with 3 additions and 4 deletions
@@ -64,8 +64,7 @@ var ListController = BasicController.extend({
// TODO: this method should be synchronous...
var self = this;
if (this.$('thead .o_list_record_selector input').prop('checked')) {
var searchView = this.getParent().searchview; // fixme
var searchData = searchView.build_search_data();
var searchData = this.searchView.build_search_data();
var userContext = this.getSession().user_context;
var results = pyeval.eval_domains_and_contexts({
domains: searchData.domains,
@@ -94,7 +94,7 @@ QUnit.module('widgets', {
},
});
list.getParent().searchview = {
list.searchView = {
build_search_data: function () {
assert.step('build_search_data');
return {
@@ -171,7 +171,7 @@ QUnit.module('widgets', {
},
});
list.getParent().searchview = {
list.searchView = {
build_search_data: function () {
assert.step('build_search_data');
return {