From c510ae8da72a2aa40e17b94856df1893faf4cee4 Mon Sep 17 00:00:00 2001 From: Soncrits Date: Wed, 10 Jul 2024 08:02:25 +0700 Subject: [PATCH] [UPG] viin_brand_im_livechat: upgrade to version 17.0 --- viin_brand_im_livechat/__init__.py | 1 + viin_brand_im_livechat/__manifest__.py | 7 ++- viin_brand_im_livechat/data/digest_data.xml | 21 +++++++++ .../data/im_livechat_channel_demo.xml | 23 +++++----- .../data/im_livechat_chatbot_data.xml | 9 ++++ .../data/mail_templates.xml | 9 ++++ viin_brand_im_livechat/i18n/vi_VN.po | 46 +++++++++++++++++-- .../i18n/viin_brand_im_livechat.pot | 46 +++++++++++++++++-- viin_brand_im_livechat/models/__init__.py | 1 + .../models/im_livechat_channel.py | 9 ++++ .../static/src/legacy/public_livechat.scss | 22 --------- 11 files changed, 152 insertions(+), 42 deletions(-) create mode 100644 viin_brand_im_livechat/data/digest_data.xml create mode 100644 viin_brand_im_livechat/data/im_livechat_chatbot_data.xml create mode 100644 viin_brand_im_livechat/data/mail_templates.xml create mode 100644 viin_brand_im_livechat/models/__init__.py create mode 100644 viin_brand_im_livechat/models/im_livechat_channel.py delete mode 100644 viin_brand_im_livechat/static/src/legacy/public_livechat.scss diff --git a/viin_brand_im_livechat/__init__.py b/viin_brand_im_livechat/__init__.py index e69de29b..0650744f 100644 --- a/viin_brand_im_livechat/__init__.py +++ b/viin_brand_im_livechat/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/viin_brand_im_livechat/__manifest__.py b/viin_brand_im_livechat/__manifest__.py index e089c299..088315d4 100644 --- a/viin_brand_im_livechat/__manifest__.py +++ b/viin_brand_im_livechat/__manifest__.py @@ -45,14 +45,17 @@ 'data/im_livechat_channel_demo.xml' ], 'data': [ - # 'security/ir.model.access.csv', + 'data/digest_data.xml', + 'data/im_livechat_chatbot_data.xml', + 'data/mail_templates.xml', 'views/im_livechat_channel_templates.xml', 'views/im_livechat_channel_views.xml' ], 'images': [ # 'static/description/main_screenshot.png' ], - 'installable': False, # set auto_install True after upgrading for v17 after upgrading for v17 + 'installable': True, + 'auto_install': True, 'price': 0.0, 'currency': 'EUR', 'license': 'OPL-1', diff --git a/viin_brand_im_livechat/data/digest_data.xml b/viin_brand_im_livechat/data/digest_data.xml new file mode 100644 index 00000000..8607ae22 --- /dev/null +++ b/viin_brand_im_livechat/data/digest_data.xml @@ -0,0 +1,21 @@ + + + + +
+

Tip: Use canned responses to chat faster +

+

Use canned responses to define templates + of + messages in the livechat app. To load a canned + response, start your sentence with ':' and select + the template. +

+ +
+
+
+
+
diff --git a/viin_brand_im_livechat/data/im_livechat_channel_demo.xml b/viin_brand_im_livechat/data/im_livechat_channel_demo.xml index 030cfbc4..424c4f34 100644 --- a/viin_brand_im_livechat/data/im_livechat_channel_demo.xml +++ b/viin_brand_im_livechat/data/im_livechat_channel_demo.xml @@ -1,21 +1,20 @@ - - mail.channel - - email - + Hi, if you need help with your database, feel free to contact our support via http://www.viindoo.com/ticket - - - mail.channel - - email - + Yes, of course, you can find it here: https://viindoo.com/documentation/16.0/applications.html - + + + I was wondering if Viindoo has an application to easily manage social media for my business.. + + + You're welcome, enjoy Viindoo! + + + Hello Joel Willis, you're at the right place! You can customize Viindoo using our Studio application in just a few clicks. diff --git a/viin_brand_im_livechat/data/im_livechat_chatbot_data.xml b/viin_brand_im_livechat/data/im_livechat_chatbot_data.xml new file mode 100644 index 00000000..3802132a --- /dev/null +++ b/viin_brand_im_livechat/data/im_livechat_chatbot_data.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/viin_brand_im_livechat/data/mail_templates.xml b/viin_brand_im_livechat/data/mail_templates.xml new file mode 100644 index 00000000..b2f742c1 --- /dev/null +++ b/viin_brand_im_livechat/data/mail_templates.xml @@ -0,0 +1,9 @@ + + + diff --git a/viin_brand_im_livechat/i18n/vi_VN.po b/viin_brand_im_livechat/i18n/vi_VN.po index 7c33db32..f37d64ee 100644 --- a/viin_brand_im_livechat/i18n/vi_VN.po +++ b/viin_brand_im_livechat/i18n/vi_VN.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-15 09:37+0000\n" -"PO-Revision-Date: 2023-02-15 09:37+0000\n" +"POT-Creation-Date: 2024-07-10 09:39+0000\n" +"PO-Revision-Date: 2024-07-10 09:39+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,6 +20,21 @@ msgstr "" msgid "Viindoo" msgstr "" +#. module: viin_brand_im_livechat +#: model:ir.model.fields,field_description:viin_brand_im_livechat.field_im_livechat_channel__button_background_color +msgid "Button Background Color" +msgstr "Màu nền của nút" + +#. module: viin_brand_im_livechat +#: model:ir.model.fields,help:viin_brand_im_livechat.field_im_livechat_channel__button_background_color +msgid "Default background color of the Livechat button" +msgstr "Màu nền mặc định cho nút Chat trực tuyến" + +#. module: viin_brand_im_livechat +#: model:ir.model.fields,help:viin_brand_im_livechat.field_im_livechat_channel__header_background_color +msgid "Default background color of the channel header once open" +msgstr "Màu nền mặc định cho header của kênh khi nó được mở ra" + #. module: viin_brand_im_livechat #: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.im_livechat_channel_view_form msgid "" @@ -31,6 +46,16 @@ msgstr "" "Thiết lập và chọn Kênh chat trực tuyến ở website mà bạn muốn thêm vào " "website của bạn" +#. module: viin_brand_im_livechat +#: model:ir.model.fields,field_description:viin_brand_im_livechat.field_im_livechat_channel__header_background_color +msgid "Header Background Color" +msgstr "Màu nền Header" + +#. module: viin_brand_im_livechat +#: model:ir.model,name:viin_brand_im_livechat.model_im_livechat_channel +msgid "Livechat Channel" +msgstr "Kênh Chat Trực tuyến" + #. module: viin_brand_im_livechat #: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.im_livechat_channel_view_form msgid "" @@ -39,3 +64,18 @@ msgid "" msgstr "" "Những người vận hành mà không có bất cứ hoạt động nào trong Viindoo nhiều " "hơn 30 phút được coi là không kết nối." + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "Powered by" +msgstr "" + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "Viindoo" +msgstr "" + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "https://viindoo.com?utm_source=db&utm_medium=email" +msgstr "" diff --git a/viin_brand_im_livechat/i18n/viin_brand_im_livechat.pot b/viin_brand_im_livechat/i18n/viin_brand_im_livechat.pot index 6b445a6c..55fa0f0a 100644 --- a/viin_brand_im_livechat/i18n/viin_brand_im_livechat.pot +++ b/viin_brand_im_livechat/i18n/viin_brand_im_livechat.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-15 09:37+0000\n" -"PO-Revision-Date: 2023-02-15 09:37+0000\n" +"POT-Creation-Date: 2024-07-10 09:39+0000\n" +"PO-Revision-Date: 2024-07-10 09:39+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,6 +20,21 @@ msgstr "" msgid "Viindoo" msgstr "" +#. module: viin_brand_im_livechat +#: model:ir.model.fields,field_description:viin_brand_im_livechat.field_im_livechat_channel__button_background_color +msgid "Button Background Color" +msgstr "" + +#. module: viin_brand_im_livechat +#: model:ir.model.fields,help:viin_brand_im_livechat.field_im_livechat_channel__button_background_color +msgid "Default background color of the Livechat button" +msgstr "" + +#. module: viin_brand_im_livechat +#: model:ir.model.fields,help:viin_brand_im_livechat.field_im_livechat_channel__header_background_color +msgid "Default background color of the channel header once open" +msgstr "" + #. module: viin_brand_im_livechat #: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.im_livechat_channel_view_form msgid "" @@ -28,9 +43,34 @@ msgid "" "your website." msgstr "" +#. module: viin_brand_im_livechat +#: model:ir.model.fields,field_description:viin_brand_im_livechat.field_im_livechat_channel__header_background_color +msgid "Header Background Color" +msgstr "" + +#. module: viin_brand_im_livechat +#: model:ir.model,name:viin_brand_im_livechat.model_im_livechat_channel +msgid "Livechat Channel" +msgstr "" + #. module: viin_brand_im_livechat #: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.im_livechat_channel_view_form msgid "" "Operators that do not show any activity In Viindoo for more than 30 minutes " "will be considered as disconnected." msgstr "" + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "Powered by" +msgstr "" + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "Viindoo" +msgstr "" + +#. module: viin_brand_im_livechat +#: model_terms:ir.ui.view,arch_db:viin_brand_im_livechat.livechat_email_template +msgid "https://viindoo.com?utm_source=db&utm_medium=email" +msgstr "" diff --git a/viin_brand_im_livechat/models/__init__.py b/viin_brand_im_livechat/models/__init__.py new file mode 100644 index 00000000..96ea01cb --- /dev/null +++ b/viin_brand_im_livechat/models/__init__.py @@ -0,0 +1 @@ +from . import im_livechat_channel diff --git a/viin_brand_im_livechat/models/im_livechat_channel.py b/viin_brand_im_livechat/models/im_livechat_channel.py new file mode 100644 index 00000000..99c0e740 --- /dev/null +++ b/viin_brand_im_livechat/models/im_livechat_channel.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class ImLivechatChannel(models.Model): + _inherit = 'im_livechat.channel' + + # override to debranding livechat of odoo + header_background_color = fields.Char(default="#7f4282") + button_background_color = fields.Char(default="#7f4282") diff --git a/viin_brand_im_livechat/static/src/legacy/public_livechat.scss b/viin_brand_im_livechat/static/src/legacy/public_livechat.scss deleted file mode 100644 index 49befd7d..00000000 --- a/viin_brand_im_livechat/static/src/legacy/public_livechat.scss +++ /dev/null @@ -1,22 +0,0 @@ -.o_livechat_button { - background-color: $o-brand-primary !important; -} -.o_thread_window { - .o_composer_text_field { - line-height: 2em; - border: 1px solid $gray-200; - font-size: 1.3em; - - &:hover, - &:active, - &:focus { - border: 1px solid $gray-200; - border-bottom: $brand-primary; - } - } - - .o_thread_window_header { - height: auto; - background-color: darken($brand-primary, 5%) !important; - } -}