summaryrefslogtreecommitdiff
path: root/addons/account/static/src/js/section_and_note_fields_backend.js
diff options
context:
space:
mode:
authorDavid Monjoie <dmo@odoo.com>2019-05-29 13:24:33 +0000
committerDavid Monjoie <dmo@odoo.com>2019-06-04 07:04:50 +0000
commit88a26235ca97e2901e5969df03adaf4d023452d3 (patch)
treef995b9de0221c89f65d81d9d3119f530a1c25e13 /addons/account/static/src/js/section_and_note_fields_backend.js
parent2bffd654518a72ecc4c9df07f9565e4789f4b195 (diff)
[IMP] web: add optional fields parameter
This commit adds a new parameter on fields for list view and one2many. The parameter name is "optional" and its values are "hide" or "show". Columns of the list view which have the optional parameter set are listed in a dropdown that can be toggled from the last cell of the table header. The ones with optional set to "hide" are hidden by default. User choice is stored in local storage. If no saved parameter can be found in local storage then the default value from the view is used. Due to the overflow behavior of the responsive table, we were forced to wrap the table-responsive div in yet another div. We changed the o_list_view class on the table to o_list_table in order to reuse the more generic o_list_view class on the top-most div. CSS rules and selectors had to be updated according to this change. Task-1902765
Diffstat (limited to 'addons/account/static/src/js/section_and_note_fields_backend.js')
-rw-r--r--addons/account/static/src/js/section_and_note_fields_backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/static/src/js/section_and_note_fields_backend.js b/addons/account/static/src/js/section_and_note_fields_backend.js
index 83c51d6fa14..267050fa07c 100644
--- a/addons/account/static/src/js/section_and_note_fields_backend.js
+++ b/addons/account/static/src/js/section_and_note_fields_backend.js
@@ -67,7 +67,7 @@ var SectionAndNoteListRenderer = ListRenderer.extend({
_renderView: function () {
var self = this;
return this._super.apply(this, arguments).then(function () {
- self.$('> table').addClass('o_section_and_note_list_view');
+ self.$('.o_list_table').addClass('o_section_and_note_list_view');
});
}
});