diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-03-22 14:17:17 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 6bad524bb356654208a9bc9dada0de2cfc67b0af (patch) | |
| tree | f4c8821cffaf68166802376b054959d69b48200b /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | b3015960c1e4dd282d948fb5f56490639d81c343 (diff) | |
[FIX] web: grouped Kanban: don't display nocontent helper
When the kanban is grouped and its groups contain no record, the
nocontent helper shouldn't be displayed. This wasn't the case
before this rev.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_controller.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index 2847003f5df..c21d7a43335 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -108,6 +108,17 @@ return AbstractController.extend(FieldManagerMixin, { } }, /** + * Used by list and kanban views to determine whether or not to display + * the no content helper (if there is no data in the state to display) + * + * @private + * @param {Object} state + * @returns {boolean} + */ + _hasContent: function (state) { + return state.count !== 0; + }, + /** * Hook method, called when record(s) has been deleted. * * @see _deleteRecord |
