[MERGE] forward port of branch 8.0 up to e883193
[odoo/odoo.git] / addons / web / static / src / js / view_list.js
index 9df9247..d7e867a 100644 (file)
@@ -374,9 +374,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
         var $column = $(e.currentTarget);
         var col_name = $column.data('id');
         var field = this.fields_view.fields[col_name];
-        // test if the field is a function field with store=false, since it's impossible
-        // for the server to sort those fields we desactivate the feature
-        if (field && field.store === false) {
+        // test whether the field is sortable
+        if (field && !field.sortable) {
             return false;
         }
         this.dataset.sort(col_name);