summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/chrome
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/web/static/tests/chrome
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/web/static/tests/chrome')
-rw-r--r--addons/web/static/tests/chrome/action_manager_tests.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/tests/chrome/action_manager_tests.js b/addons/web/static/tests/chrome/action_manager_tests.js
index b14ccefb447..7ac817af30c 100644
--- a/addons/web/static/tests/chrome/action_manager_tests.js
+++ b/addons/web/static/tests/chrome/action_manager_tests.js
@@ -2889,7 +2889,7 @@ QUnit.module('ActionManager', {
});
await actionManager.doAction(3);
- assert.doesNotHaveClass(actionManager.$('.o_list_view'), 'o_list_view_grouped',
+ assert.doesNotHaveClass(actionManager.$('.o_list_table'), 'o_list_table_grouped',
"list view is not grouped");
// open group by dropdown
@@ -2898,7 +2898,7 @@ QUnit.module('ActionManager', {
// click on first link
await testUtils.dom.click($('.o_control_panel .o_group_by_menu a:first'));
- assert.hasClass(actionManager.$('.o_list_view'),'o_list_view_grouped',
+ assert.hasClass(actionManager.$('.o_list_table'),'o_list_table_grouped',
'list view is now grouped');
actionManager.destroy();
@@ -3110,7 +3110,7 @@ QUnit.module('ActionManager', {
});
await actionManager.doAction(3);
- assert.containsOnce(actionManager, '.o_list_view_grouped',
+ assert.containsOnce(actionManager, '.o_list_table_grouped',
"should be grouped");
assert.containsN(actionManager, '.o_group_header', 2,
"should be grouped by 'bar' (two groups) at first load");
@@ -3125,7 +3125,7 @@ QUnit.module('ActionManager', {
// remove the groupby in the searchview
await testUtils.dom.click($('.o_control_panel .o_searchview .o_facet_remove'));
- assert.containsOnce(actionManager, '.o_list_view_grouped',
+ assert.containsOnce(actionManager, '.o_list_table_grouped',
"should still be grouped");
assert.containsN(actionManager, '.o_group_header', 2,
"should be grouped by 'bar' (two groups) at reload");