summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/list/list_controller.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/list/list_controller.js b/addons/web/static/src/js/views/list/list_controller.js
index 460ad5de100..67cc6271509 100644
--- a/addons/web/static/src/js/views/list/list_controller.js
+++ b/addons/web/static/src/js/views/list/list_controller.js
@@ -355,8 +355,8 @@ var ListController = BasicController.extend({
// trigger a click on the main bus, which would be then caught by the
// list editable renderer and would unselect the newly created row
event.stopPropagation();
-
- if (this.editable) {
+ var state = this.model.get(this.handle, {raw: true});
+ if (this.editable && !state.groupedBy.length) {
this._addRecord();
} else {
this.trigger_up('switch_view', {view_type: 'form', res_id: undefined});