summaryrefslogtreecommitdiff
path: root/addons/sms/static/src/components/notification_group
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/sms/static/src/components/notification_group
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/sms/static/src/components/notification_group')
-rw-r--r--addons/sms/static/src/components/notification_group/notification_group.js27
-rw-r--r--addons/sms/static/src/components/notification_group/notification_group.xml12
2 files changed, 39 insertions, 0 deletions
diff --git a/addons/sms/static/src/components/notification_group/notification_group.js b/addons/sms/static/src/components/notification_group/notification_group.js
new file mode 100644
index 00000000..053fedc5
--- /dev/null
+++ b/addons/sms/static/src/components/notification_group/notification_group.js
@@ -0,0 +1,27 @@
+odoo.define('sms/static/src/components/notification_group/notification_group.js', function (require) {
+'use strict';
+
+const components = {
+ NotificationGroup: require('mail/static/src/components/notification_group/notification_group.js'),
+};
+
+const { patch } = require('web.utils');
+
+patch(components.NotificationGroup, 'sms/static/src/components/notification_group/notification_group.js', {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ /**
+ * @override
+ */
+ image() {
+ if (this.group.notification_type === 'sms') {
+ return '/sms/static/img/sms_failure.svg';
+ }
+ return this._super(...arguments);
+ },
+});
+
+});
diff --git a/addons/sms/static/src/components/notification_group/notification_group.xml b/addons/sms/static/src/components/notification_group/notification_group.xml
new file mode 100644
index 00000000..c5f5a8db
--- /dev/null
+++ b/addons/sms/static/src/components/notification_group/notification_group.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates xml:space="preserve">
+
+ <t t-inherit="mail.NotificationGroup" t-inherit-mode="extension">
+ <xpath expr="//*[hasclass('o_NotificationGroup_inlineText')]" position="inside">
+ <t t-if="group.notification_type === 'sms'">
+ An error occurred when sending an SMS.
+ </t>
+ </xpath>
+ </t>
+
+</templates>