From 99b4b861e8b59e9d952452b19c008da4c6dc63bf Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Tue, 20 Jun 2023 11:25:25 +0000 Subject: [PATCH] [IMP] im_livechat: improve livechat session history search This PR improves the search on livechat session's history: - Rename "Name" into "Attendee" - Add quick filters: - My sessions - My Team - Session Date - Ratings: Good / Bad / Unrated - Rename "Creation Date" into "Session Date" At the same time, this PR fixes the livechat channel demo data since they were not realistic: - Older messages should have lower ids - Operators should be members of the channel - Rating must be the last message of the channel - Missing `email_from` for visitor messages part of task-3332872 closes odoo/odoo#125891 Signed-off-by: Didier Debondt (did) --- addons/hr_livechat/__init__.py | 0 addons/hr_livechat/__manifest__.py | 13 + .../views/discuss_channel_views.xml | 15 + addons/im_livechat/__init__.py | 1 + addons/im_livechat/__manifest__.py | 15 +- .../data/im_livechat_channel_demo.xml | 502 ------------------ .../discuss_shortcode_demo.xml | 0 .../im_livechat_channel.xml | 17 + .../im_livechat_session_1.xml | 87 +++ .../im_livechat_session_10.xml | 75 +++ .../im_livechat_session_11.xml | 56 ++ .../im_livechat_session_2.xml | 87 +++ .../im_livechat_session_3.xml | 76 +++ .../im_livechat_session_4.xml | 67 +++ .../im_livechat_session_5.xml | 78 +++ .../im_livechat_session_6.xml | 78 +++ .../im_livechat_session_7.xml | 76 +++ .../im_livechat_session_8.xml | 76 +++ .../im_livechat_session_9.xml | 104 ++++ .../views/discuss_channel_views.xml | 11 +- 20 files changed, 928 insertions(+), 506 deletions(-) create mode 100644 addons/hr_livechat/__init__.py create mode 100644 addons/hr_livechat/__manifest__.py create mode 100644 addons/hr_livechat/views/discuss_channel_views.xml delete mode 100644 addons/im_livechat/data/im_livechat_channel_demo.xml rename addons/im_livechat/{data => demo/discuss_shortcode}/discuss_shortcode_demo.xml (100%) create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_channel.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_1.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_10.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_11.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_2.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_3.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_4.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_5.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_6.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_7.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_8.xml create mode 100644 addons/im_livechat/demo/im_livechat_channel/im_livechat_session_9.xml diff --git a/addons/hr_livechat/__init__.py b/addons/hr_livechat/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/addons/hr_livechat/__manifest__.py b/addons/hr_livechat/__manifest__.py new file mode 100644 index 00000000000..9d75a8652bc --- /dev/null +++ b/addons/hr_livechat/__manifest__.py @@ -0,0 +1,13 @@ +{ + 'name': 'HR - Livechat', + 'version': '1.0', + 'category': 'Human Resources', + 'description': """ + Bridge between HR and Livechat.""", + 'depends': ['hr', 'im_livechat'], + 'data': [ + 'views/discuss_channel_views.xml', + ], + 'auto_install': True, + 'license': 'LGPL-3', +} diff --git a/addons/hr_livechat/views/discuss_channel_views.xml b/addons/hr_livechat/views/discuss_channel_views.xml new file mode 100644 index 00000000000..c0bbf14d7e0 --- /dev/null +++ b/addons/hr_livechat/views/discuss_channel_views.xml @@ -0,0 +1,15 @@ + + + + + discuss.channel.search.inherit.hr.livechat + discuss.channel + + + + + + + + + diff --git a/addons/im_livechat/__init__.py b/addons/im_livechat/__init__.py index 2da4912a4ba..b8980e258a2 100644 --- a/addons/im_livechat/__init__.py +++ b/addons/im_livechat/__init__.py @@ -2,3 +2,4 @@ from . import controllers from . import models from . import report +from . import demo diff --git a/addons/im_livechat/__manifest__.py b/addons/im_livechat/__manifest__.py index 353d419e4d2..e72519d3ee0 100644 --- a/addons/im_livechat/__manifest__.py +++ b/addons/im_livechat/__manifest__.py @@ -40,8 +40,19 @@ Help your customers with this chat, and analyse their feedback. "report/im_livechat_report_operator_views.xml" ], 'demo': [ - "data/im_livechat_channel_demo.xml", - 'data/discuss_shortcode_demo.xml', + "demo/im_livechat_channel/im_livechat_channel.xml", + "demo/im_livechat_channel/im_livechat_session_1.xml", + "demo/im_livechat_channel/im_livechat_session_2.xml", + "demo/im_livechat_channel/im_livechat_session_3.xml", + "demo/im_livechat_channel/im_livechat_session_4.xml", + "demo/im_livechat_channel/im_livechat_session_5.xml", + "demo/im_livechat_channel/im_livechat_session_6.xml", + "demo/im_livechat_channel/im_livechat_session_7.xml", + "demo/im_livechat_channel/im_livechat_session_8.xml", + "demo/im_livechat_channel/im_livechat_session_9.xml", + "demo/im_livechat_channel/im_livechat_session_10.xml", + "demo/im_livechat_channel/im_livechat_session_11.xml", + "demo/discuss_shortcode/discuss_shortcode_demo.xml", ], 'depends': ["mail", "rating", "digest", "utm"], 'installable': True, diff --git a/addons/im_livechat/data/im_livechat_channel_demo.xml b/addons/im_livechat/data/im_livechat_channel_demo.xml deleted file mode 100644 index 588264ff41c..00000000000 --- a/addons/im_livechat/data/im_livechat_channel_demo.xml +++ /dev/null @@ -1,502 +0,0 @@ - - - - - /im_livechat/ - auto_popup - 3 - - - - - - - - - - - - - - livechat - - - Visitor #234, Mitchell Admin - Visitor #234, Mitchell Admin - - - LIVECHAT_1 - - - - - - - - - discuss.channel - - email - - You're welcome, have a nice day! - - - - discuss.channel - - email - - Great! Thanks for the info - - - - discuss.channel - - email - - Yes, you can use our Timesheets application to record your time efficiently! - - - - discuss.channel - - email - - I'm looking for an application to record my timesheet, any tips? - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Visitor #323, Marc Demo - Visitor #323, Marc Demo - - - LIVECHAT_2 - - - - - - - - - discuss.channel - - email - - You're welcome, enjoy Odoo! - - - - discuss.channel - - email - - Awesome, thanks! - - - - discuss.channel - - email - - Yes, we just released a new application called Social Marketing that should fit your needs! Check it out :) - - - - discuss.channel - - email - - I was wondering if Odoo has an application to easily manage social media for my business.. - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Joel Willis, Mitchell Admin - Joel Willis, Mitchell Admin - - - LIVECHAT_3 - - - - - - - - - - discuss.channel - - email - - Oh :( - - - - discuss.channel - - email - - Nope, sorry to disappoint :( - - - - discuss.channel - - email - - Hello, are you single? - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Joel Willis, Marc Demo - Joel Willis, Marc Demo - - - LIVECHAT_4 - - - - - - - - - - discuss.channel - - email - - Thanks for the info, I'll look into it! - - - - discuss.channel - - email - - Hello Joel Willis, you're at the right place! You can customize Odoo using our Studio application in just a few clicks. - - - - discuss.channel - - email - - Hello, I'm looking for a software that can be easily updated with my needs. - - - - - livechat - - - Visitor #532, Mitchell Admin - Visitor #532, Mitchell Admin - - - LIVECHAT_5 - - - - - - - - - discuss.channel - - email - - Ok.. Will do, thanks - - - - discuss.channel - - email - - Hi, if you need help with your database, feel free to contact our support via http://www.odoo.com/help - - - - discuss.channel - - email - - Hello, it seems that I can't log in to my database. Can you help? - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Visitor #649, Mitchell Admin - Visitor #649, Mitchell Admin - - - LIVECHAT_6 - - - - - - - - - discuss.channel - - email - - Thanks! - - - - discuss.channel - - email - - Yes, of course, you can find it here: https://www.odoo.com/documentation/master/ - - - - discuss.channel - - email - - Hello, I'm a bit lost in the Invetory module, is there some documentation I could find? - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Joel Willis, Mitchell Admin - Joel Willis, Mitchell Admin - - - LIVECHAT_7 - - - - - - - - - discuss.channel - - email - - Good to hear, thanks! - - - - discuss.channel - - email - - Joel Willis, you'll need our Inventory and Sales application to do so. You can try them for 15 days, FOR FREE :) - - - - discuss.channel - - email - - Hi, I need a software to easily manage my stock, and generate sales orders. - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - livechat - - - Visitor #722, Marc Demo - Visitor #722, Marc Demo - - - LIVECHAT_8 - - - - - - - - - discuss.channel - - email - - I'm great, thanks for asking! - - - - discuss.channel - - email - - I'm fine, and you? - - - - discuss.channel - - email - - Heeeey Marc, how are you? - - - - discuss.channel - - email - - Hello, how may I help you? - - - - - Visitor, Mitchell Admin - - - - livechat - - - - - Visitor - - - Hi - - discuss.channel - - - - - - Hello, how may I help you? - - discuss.channel - - - - Visitor - - - I would like to know more about the CRM application - - discuss.channel - - - - - - The CRM application helps you to track leads, close opportunities and get accurate forecasts. You can test it for free on our website. - - discuss.channel - - - - Visitor - - - Great, thanks! - - discuss.channel - - - - Visitor - - - Rating: :-) - - discuss.channel - - - LIVECHAT_9 - - - - - - - - - - diff --git a/addons/im_livechat/data/discuss_shortcode_demo.xml b/addons/im_livechat/demo/discuss_shortcode/discuss_shortcode_demo.xml similarity index 100% rename from addons/im_livechat/data/discuss_shortcode_demo.xml rename to addons/im_livechat/demo/discuss_shortcode/discuss_shortcode_demo.xml diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_channel.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_channel.xml new file mode 100644 index 00000000000..cca8bf9e3ad --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_channel.xml @@ -0,0 +1,17 @@ + + + + + /im_livechat/ + auto_popup + 3 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_1.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_1.xml new file mode 100644 index 00000000000..66e76983449 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_1.xml @@ -0,0 +1,87 @@ + + + + + livechat + + + Visitor #234, Mitchell Admin + Visitor #234, Mitchell Admin + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Visitor + I'm looking for an application to record my timesheet, any tips? + comment + + + + discuss.channel + + email + + Yes, you can use our Timesheets application to record your time efficiently! + comment + + + + discuss.channel + + email + + Visitor + Great! Thanks for the info + comment + + + + discuss.channel + + email + + You're welcome, have a nice day! + comment + + + + discuss.channel + + + + + + + LIVECHAT_1 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_10.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_10.xml new file mode 100644 index 00000000000..5fe63ec605e --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_10.xml @@ -0,0 +1,75 @@ + + + + + Visitor, Mitchell Admin + + + + livechat + + + + + + False + + + + + + + + + Visitor + Visitor + + + + Hi + comment + + discuss.channel + + + + + + + Hello, how may I help you? + comment + + discuss.channel + + + + Visitor + Visitor + + + + I would like to know more about the discuss application + comment + + discuss.channel + + + discuss.channel + + + + + + + LIVECHAT_10 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_11.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_11.xml new file mode 100644 index 00000000000..b1e45057de9 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_11.xml @@ -0,0 +1,56 @@ + + + + + Visitor, Mitchell Admin + + + + livechat + + + + + + + + + + + + + + Visitor + + + + Hi + Visitor + comment + + discuss.channel + + + + + + + Hello, how may I help you? + comment + + discuss.channel + + + + Visitor + + + + Visitor + I would like to know more about the Discuss application + comment + + discuss.channel + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_2.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_2.xml new file mode 100644 index 00000000000..ae9b8773ee8 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_2.xml @@ -0,0 +1,87 @@ + + + + + livechat + + + Visitor #323, Marc Demo + Visitor #323, Marc Demo + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Visitor + I was wondering if Odoo has an application to easily manage social media for my business.. + comment + + + + discuss.channel + + email + + Yes, we just released a new application called Social Marketing that should fit your needs! Check it out :) + comment + + + + discuss.channel + + email + + Visitor + Awesome, thanks! + comment + + + + discuss.channel + + email + + You're welcome, enjoy Odoo! + comment + + + + discuss.channel + + + + + + + LIVECHAT_2 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_3.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_3.xml new file mode 100644 index 00000000000..0af655c96f2 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_3.xml @@ -0,0 +1,76 @@ + + + + + livechat + + + Joel Willis, Mitchell Admin + Joel Willis, Mitchell Admin + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Hello, are you single? + comment + + + + discuss.channel + + email + + Nope, sorry to disappoint :( + comment + + + + discuss.channel + + email + + Oh :( + comment + + + + discuss.channel + + + + + + + LIVECHAT_3 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_4.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_4.xml new file mode 100644 index 00000000000..9540e31ef94 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_4.xml @@ -0,0 +1,67 @@ + + + + + livechat + + + Joel Willis, Marc Demo + Joel Willis, Marc Demo + + + + + False + + + + + + + + discuss.channel + + email + + Hello, I'm looking for a software that can be easily updated with my needs. + comment + + + + discuss.channel + + email + + Hello Joel Willis, you're at the right place! You can customize Odoo using our Studio application in just a few clicks. + comment + + + + discuss.channel + + email + + Thanks for the info, I'll look into it! + comment + + + + discuss.channel + + + + + + + LIVECHAT_4 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_5.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_5.xml new file mode 100644 index 00000000000..087ef6f60f8 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_5.xml @@ -0,0 +1,78 @@ + + + + + livechat + + + Visitor #532, Mitchell Admin + Visitor #532, Mitchell Admin + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Visitor + Hello, it seems that I can't log in to my database. Can you help? + comment + + + + discuss.channel + + email + + Hi, if you need help with your database, feel free to contact our support via http://www.odoo.com/help + comment + + + + discuss.channel + + email + + Visitor + Ok.. Will do, thanks + comment + + + + discuss.channel + + + + + + + LIVECHAT_5 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_6.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_6.xml new file mode 100644 index 00000000000..799afb253c0 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_6.xml @@ -0,0 +1,78 @@ + + + + + livechat + + + Visitor #649, Mitchell Admin + Visitor #649, Mitchell Admin + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Visitor + Hello, I'm a bit lost in the Invetory module, is there some documentation I could find? + comment + + + + discuss.channel + + email + + Yes, of course, you can find it here: https://www.odoo.com/documentation/master/ + comment + + + + discuss.channel + + email + + Visitor + Thanks! + comment + + + + discuss.channel + + + + + + + LIVECHAT_6 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_7.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_7.xml new file mode 100644 index 00000000000..3f9869e8c82 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_7.xml @@ -0,0 +1,76 @@ + + + + + livechat + + + Joel Willis, Mitchell Admin + Joel Willis, Mitchell Admin + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Hi, I need a software to easily manage my stock, and generate sales orders. + comment + + + + discuss.channel + + email + + Joel Willis, you'll need our Inventory and Sales application to do so. You can try them for 15 days, FOR FREE :) + comment + + + + discuss.channel + + email + + Good to hear, thanks! + comment + + + + discuss.channel + + + + + + + LIVECHAT_7 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_8.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_8.xml new file mode 100644 index 00000000000..cf8a7eb124d --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_8.xml @@ -0,0 +1,76 @@ + + + + + livechat + + + Visitor #722, Marc Demo + Visitor #722, Marc Demo + + + + + False + + + + + + + + discuss.channel + + email + + Hello, how may I help you? + comment + + + + discuss.channel + + email + + Heeeey Marc, how are you? + comment + + + + discuss.channel + + email + + I'm fine, and you? + comment + + + + discuss.channel + + email + + I'm great, thanks for asking! + comment + + + + discuss.channel + + + + + + + LIVECHAT_8 + + + + + + + + + + diff --git a/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_9.xml b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_9.xml new file mode 100644 index 00000000000..24a2f1a2bb4 --- /dev/null +++ b/addons/im_livechat/demo/im_livechat_channel/im_livechat_session_9.xml @@ -0,0 +1,104 @@ + + + + + Visitor, Mitchell Admin + + + + livechat + + + + + False + + + + + + + + + Visitor + + + + Hi + comment + + discuss.channel + + + + + + + Hello, how may I help you? + comment + + discuss.channel + + + + Visitor + + + + I would like to know more about the CRM application + comment + + discuss.channel + + + + + + + The CRM application helps you to track leads, close opportunities and get accurate forecasts. You can test it for free on our website. + comment + + discuss.channel + + + + Visitor + + + + Great, thanks! + comment + + discuss.channel + + + + Visitor + + + + Rating: :-) + comment + + discuss.channel + + + discuss.channel + + + + + + + LIVECHAT_9 + + + + + + + + + + diff --git a/addons/im_livechat/views/discuss_channel_views.xml b/addons/im_livechat/views/discuss_channel_views.xml index a6ec0f30eaa..bd20b5bb117 100644 --- a/addons/im_livechat/views/discuss_channel_views.xml +++ b/addons/im_livechat/views/discuss_channel_views.xml @@ -7,11 +7,18 @@ discuss.channel - + + + + + + + + - +