summaryrefslogtreecommitdiff
path: root/addons/sms/static/src/models/notification_group/notification_group.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/sms/static/src/models/notification_group/notification_group.js')
-rw-r--r--addons/sms/static/src/models/notification_group/notification_group.js53
1 files changed, 29 insertions, 24 deletions
diff --git a/addons/sms/static/src/models/notification_group/notification_group.js b/addons/sms/static/src/models/notification_group/notification_group.js
index 151d794b86c..9e7c38d2325 100644
--- a/addons/sms/static/src/models/notification_group/notification_group.js
+++ b/addons/sms/static/src/models/notification_group/notification_group.js
@@ -15,18 +15,18 @@ registerInstancePatchModel('mail.notification_group', 'sms/static/src/models/not
* @override
*/
openCancelAction() {
- if (this.notification_type === 'sms') {
- this.env.bus.trigger('do-action', {
- action: 'sms.sms_cancel_action',
- options: {
- additional_context: {
- default_model: this.res_model,
- unread_counter: this.notifications.length,
- },
- },
- });
+ if (this.notification_type !== 'sms') {
+ return this._super(...arguments);
}
- return this._super(...arguments);
+ this.env.bus.trigger('do-action', {
+ action: 'sms.sms_cancel_action',
+ options: {
+ additional_context: {
+ default_model: this.res_model,
+ unread_counter: this.notifications.length,
+ },
+ },
+ });
},
//--------------------------------------------------------------------------
@@ -37,20 +37,25 @@ registerInstancePatchModel('mail.notification_group', 'sms/static/src/models/not
* @override
*/
_openDocuments() {
- if (this.notification_type === 'sms') {
- this.env.bus.trigger('do-action', {
- action: {
- name: this.env._t("SMS Failures"),
- type: 'ir.actions.act_window',
- view_mode: 'kanban,list,form',
- views: [[false, 'kanban'], [false, 'list'], [false, 'form']],
- target: 'current',
- res_model: this.res_model,
- domain: [['message_has_sms_error', '=', true]],
- },
- });
+ if (this.notification_type !== 'sms') {
+ return this._super(...arguments);
+ }
+ this.env.bus.trigger('do-action', {
+ action: {
+ name: this.env._t("SMS Failures"),
+ type: 'ir.actions.act_window',
+ view_mode: 'kanban,list,form',
+ views: [[false, 'kanban'], [false, 'list'], [false, 'form']],
+ target: 'current',
+ res_model: this.res_model,
+ domain: [['message_has_sms_error', '=', true]],
+ },
+ });
+ if (this.env.messaging.device.isMobile) {
+ // messaging menu has a higher z-index than views so it must
+ // be closed to ensure the visibility of the view
+ this.messagingMenu.close();
}
- return this._super(...arguments);
},
});