summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/services')
-rw-r--r--addons/web/static/src/js/services/notification_service.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/services/notification_service.js b/addons/web/static/src/js/services/notification_service.js
index cc87305a6a2..a0d2720604b 100644
--- a/addons/web/static/src/js/services/notification_service.js
+++ b/addons/web/static/src/js/services/notification_service.js
@@ -58,6 +58,8 @@ var NotificationService = AbstractService.extend({
* Note that this method does not wait for the appendTo method to complete.
*
* @param {Object} params
+ * @param {function} [params.Notification] javascript class of a notification
+ * to instantiate by default use 'web.Notification'
* @param {string} params.title notification title
* @param {string} params.message notification main message
* @param {string} params.type 'notification' or 'warning'
@@ -78,7 +80,8 @@ var NotificationService = AbstractService.extend({
this.$el = $('<div class="o_notification_manager"/>');
this.$el.prependTo('body');
}
- var notification = this.notifications[++id] = new Notification(this, params);
+ var NotificationWidget = params.Notification || Notification;
+ var notification = this.notifications[++id] = new NotificationWidget(this, params);
notification.appendTo(this.$el);
return id;
},