summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-03-27 20:18:16 +0000
committerAaron Bohy <aab@odoo.com>2020-03-30 09:55:08 +0000
commit94583df492113211b5ab3afd9d5c25ae1fe30dba (patch)
tree424fc82d0dd26ff4ec423de609cb7fd925cf5ba7 /addons/web/static/src/js/views/basic
parent8608a5ed8dc7d14432556d2c4c469e3f8deda7f1 (diff)
[IMP] web: adapt delete feature to list selection changes
Following the new selection feature in list views, this commit adapts the delete action. Part of task 2185145
Diffstat (limited to 'addons/web/static/src/js/views/basic')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js7
1 files changed, 4 insertions, 3 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 f0fd3cc8c75..bbfee26e51f 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -346,9 +346,10 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
.then(self._onDeletedRecords.bind(self, ids));
}
if (this.confirmOnDelete) {
- Dialog.confirm(this, _t("Are you sure you want to delete this record ?"), {
- confirm_callback: doIt,
- });
+ const message = ids.length > 1 ?
+ _t("Are you sure you want to delete these records?") :
+ _t("Are you sure you want to delete this record?");
+ Dialog.confirm(this, message, { confirm_callback: doIt });
} else {
doIt();
}