diff --git a/odoo_slack_connector/README.rst b/odoo_slack_connector/README.rst new file mode 100644 index 000000000..66c5a29dc --- /dev/null +++ b/odoo_slack_connector/README.rst @@ -0,0 +1,17 @@ +Slack Odoo Connector +==================== +Allows to integrate with slack. + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Configuration +============= +Need to generate slack API token + +Credits +======= +Developer: Viswanth K v15 @ cybrosys, odoo@cybrosys.com + Viswanth K v16 @ cybrosys, odoo@cybrosys.com diff --git a/odoo_slack_connector/__init__.py b/odoo_slack_connector/__init__.py new file mode 100644 index 000000000..dc609a0b9 --- /dev/null +++ b/odoo_slack_connector/__init__.py @@ -0,0 +1,8 @@ +from . import models + + +def slack_uninstall_hook(cr, registry): + cr.execute("DELETE FROM res_partner WHERE is_slack_user='true'") + cr.execute("DELETE FROM mail_channel WHERE is_slack='true'") + cr.execute("DELETE FROM res_users WHERE is_slack_internal_users='true'") + cr.commit() diff --git a/odoo_slack_connector/__manifest__.py b/odoo_slack_connector/__manifest__.py new file mode 100644 index 000000000..c68300687 --- /dev/null +++ b/odoo_slack_connector/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': "Slack Odoo Connector", + 'version': '16.0.1.0.0', + 'summary': "Integrate slack with Odoo", + 'description': "This module will help you to connect with slack to manage slack Conversations", + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['contacts', 'mail'], + 'website': 'https://www.cybrosys.com', + 'data': [ + 'security/ir.model.access.csv', + 'data/scheduled_action.xml', + 'views/res_company.xml', + 'views/mail_message.xml', + 'views/mail_channel.xml', + 'views/res_partner.xml', + 'views/res_users.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'uninstall_hook': 'slack_uninstall_hook' + +} diff --git a/odoo_slack_connector/data/scheduled_action.xml b/odoo_slack_connector/data/scheduled_action.xml new file mode 100644 index 000000000..52b67755c --- /dev/null +++ b/odoo_slack_connector/data/scheduled_action.xml @@ -0,0 +1,15 @@ + + + + + Auto Synchronization of slack and odoo + + code + model.synchronization_slack() + + 1 + minutes + -1 + + + \ No newline at end of file diff --git a/odoo_slack_connector/doc/RELEASE_NOTES.md b/odoo_slack_connector/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d02afb07c --- /dev/null +++ b/odoo_slack_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.10.2022 +#### Version 16.0.1.0.0 +##### ADD +- Initial commit for Slack \ No newline at end of file diff --git a/odoo_slack_connector/models/__init__.py b/odoo_slack_connector/models/__init__.py new file mode 100644 index 000000000..0cbb82349 --- /dev/null +++ b/odoo_slack_connector/models/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import res_company +from . import mail_message +from . import mail_channel +from . import res_partner +from . import res_users + + diff --git a/odoo_slack_connector/models/mail_channel.py b/odoo_slack_connector/models/mail_channel.py new file mode 100644 index 000000000..0d5684c2b --- /dev/null +++ b/odoo_slack_connector/models/mail_channel.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import requests, json +from odoo import models, fields + + +class MailChannel(models.Model): + _inherit = 'mail.channel' + _description = 'Slack Channel' + + is_slack = fields.Boolean("Slack", default=False) + channel = fields.Char("ID") + msg_date = fields.Datetime() + + def sync_members(self): + """To load members into channels""" + company_record = self.env.user.company_id + payload = {} + headers = { + 'Authorization': 'Bearer ' + company_record.token + } + for channels in self: + slack_user_list = [] + sample_list = [] + slack_user_list.clear() + current_channel_user_list = [] + current_channel_user_list.clear() + + if channels.is_slack: + url = "https://slack.com/api/conversations.members?channel=" + channels.channel + channel_member_resonse = requests.request("GET", url, + headers=headers, + data=payload) + channel_members = channel_member_resonse.__dict__['_content'] + dict_channel_members = channel_members.decode("UTF-8") + channel_member = json.loads(dict_channel_members) + for slack_user_id in channel_member['members']: + contact = self.env['res.partner'].search( + [('slack_user_id', '=', slack_user_id)]) + slack_user_list.append(contact.id) + for last_seen_partner_ids in channels.channel_member_ids: + current_channel_user_list.append( + last_seen_partner_ids.partner_id.id) + for contact_id in slack_user_list: + if contact_id not in current_channel_user_list: + sample_list.append((0, 0, {'partner_id': contact_id})) + channels.channel_member_ids = sample_list diff --git a/odoo_slack_connector/models/mail_message.py b/odoo_slack_connector/models/mail_message.py new file mode 100644 index 000000000..c88f5e06f --- /dev/null +++ b/odoo_slack_connector/models/mail_message.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from datetime import date, time +from odoo import fields, models, api +import requests, re, json +from odoo.http import request +from datetime import datetime +from dateutil import tz + + +def remove_html(string): + regex = re.compile(r'<[^>]+>') + return regex.sub('', string) + + +class MailMessage(models.Model): + _inherit = 'mail.message' + _description = 'Slack Message' + + is_slack = fields.Boolean(string="Slack", default=False) + channel = fields.Many2one('mail.channel') + + @api.model + def create(self, vals): + """Over riding the create method to sent message to slack""" + res = super().create(vals) + to_zone = tz.gettz('Asia/Kolkata') + channel_date = datetime.today().strftime('%Y-%m-%d %H:%M:%S') + company_record = self.env.user.company_id + channels = self.env['mail.channel'].search([('is_slack', '=', True)]) + for channel in channels: + msg = self.env['mail.message'].search( + [('model', '=', 'mail.channel'), ('res_id', '=', channel.id), + ('is_slack', '=', False)]) + if msg: + for rec in msg: + payload = {} + headers = { + 'Authorization': 'Bearer ' + company_record.token + } + new_text = remove_html(rec.body) + url = "https://slack.com/api/chat.postMessage?channel=" + rec.record_name + "&" + "text=" + new_text + requests.request("POST", url, headers=headers, data=payload) + rec.is_slack = True + converted_time = datetime.strptime(channel_date,'%Y-%m-%d %H:%M:%S').astimezone(to_zone) + channel.msg_date = converted_time.strftime('%Y-%m-%d %H:%M:%S') + return res + + def synchronization_slack(self): + """scheduled action to retrieve message from slack""" + channel_date = datetime.today().strftime('%Y-%m-%d %H:%M:%S') + if self.env.company.slack_sync: + to_zone = tz.gettz('Asia/Kolkata') + for channel_id in self.env['mail.channel'].search( + [('is_slack', '=', 'true')]): + company_record = self.env.user.company_id + payload = {} + headers = {'Authorization': 'Bearer ' + company_record.token} + url = "https://slack.com/api/conversations.history?channel=" + channel_id.channel + channel_response = requests.request("GET", url, headers=headers, + data=payload) + channels_response = channel_response.__dict__['_content'] + dict_channels = channels_response.decode("UTF-8") + channels_history = json.loads(dict_channels) + channels_history['messages'].reverse() + if not channel_id.msg_date: + converted_time = datetime.strptime(channel_date, + '%Y-%m-%d %H:%M:%S').astimezone( + to_zone) + channel_id.msg_date = converted_time.strftime( + '%Y-%m-%d %H:%M:%S') + else: + for i in channels_history['messages']: + if 'user' in i: + users = self.env['res.users'].search( + [('slack_user_id', '=', i['user'])]) + dt_object = ( + datetime.fromtimestamp(float(i['ts'])).strftime( + '%Y-%m-%d %H:%M:%S')) + date_time_obj = datetime.strptime(dt_object, + '%Y-%m-%d %H:%M:%S') + converted_time = date_time_obj.astimezone(to_zone) + if datetime.strptime(converted_time.strftime( + '%Y-%m-%d %H:%M:%S'), + '%Y-%m-%d %H:%M:%S') > channel_id.msg_date: + self.with_user(users.id).create({ + 'body': i['text'], + 'record_name': channel_id.name, + 'model': 'mail.channel', + 'is_slack': True, + 'res_id': channel_id.id, + }) + converted_time = datetime.strptime(channel_date, + '%Y-%m-%d %H:%M:%S').astimezone( + to_zone) + channel_id.msg_date = converted_time.strftime( + '%Y-%m-%d %H:%M:%S') diff --git a/odoo_slack_connector/models/res_company.py b/odoo_slack_connector/models/res_company.py new file mode 100644 index 000000000..99c6a3c4c --- /dev/null +++ b/odoo_slack_connector/models/res_company.py @@ -0,0 +1,143 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models +import requests, json + + +class ResCompanyInherited(models.Model): + _inherit = 'res.company' + _description = 'Slack Api' + + token = fields.Char(required=True, string="Slack Token") + slack_users_ids = fields.One2many('res.company.slack.users', + 'res_company_id', + "All Users") + slack_channel_ids = fields.One2many('res.company.slack.channels', + 'res_company_id', + "Channels") + slack_sync = fields.Boolean(default=False) + + def sync_conversations(self): + """To sync channels and members from slack""" + self.slack_sync = True + url1 = "https://slack.com/api/users.list" + url2 = "https://slack.com/api/conversations.list" + url3 = "https://slack.com/api/users.info?user=" + + payload = {} + headers = { + 'Authorization': 'Bearer ' + self.token + } + + users_response = requests.request("GET", url1, headers=headers, + data=payload) + users_response = users_response.__dict__['_content'] + dict_users = users_response.decode("UTF-8") + users = json.loads(dict_users) + + channel_list = [] + channel_response = requests.request("GET", url2, headers=headers, + data=payload) + channels_response = channel_response.__dict__['_content'] + dict_channels = channels_response.decode("UTF-8") + channels = json.loads(dict_channels) + + search_channel = self.env['mail.channel'].search([]) + search_channel.sync_members() + self.env['res.users'].search([]).sync_users() + for i in search_channel: + channel_list.append(i.channel) + for channel in channels['channels']: + if channel['id'] not in channel_list: + self.env['mail.channel'].create([ + { + 'name': channel['name'], + 'channel': channel['id'], + 'is_slack': True, + }, ]) + + users_list = [] + slack_id_list = [] + slack_internal_user_list = [] + members_list = [] + channels_list = [] + record_channel_list = [] + record = self.env.user.company_id + for in_channel in self.slack_channel_ids: + record_channel_list.append(in_channel.name) + for channel in channels['channels']: + if channel['name'] not in record_channel_list: + channels_list.append((0, 0, + {'name': channel['name']} + )) + self.slack_channel_ids = channels_list + + record_user_list = [] + for rec in record.slack_users_ids: + record_user_list.append(rec.user) + for rec in users['members']: + if 'email' in rec['profile']: + email = rec['profile']['email'] + else: + email = '' + if rec['id'] not in record_user_list: + users_list.append((0, 0, + {'name': rec['real_name'], + 'user': rec['id'], + 'email': email}, + )) + self.slack_users_ids = users_list + + for partner_id in self.env['res.partner'].search([]): + slack_id_list.append(partner_id.slack_user_id) + for rec in users['members']: + # if rec['is_email_confirmed'] is True: + if 'email' in rec['profile']: + email = rec['profile']['email'] + else: + email = '' + if rec['id'] not in slack_id_list: + vals = { + 'name': rec['real_name'], + 'slack_user_id': rec['id'], + 'is_slack_user': True, + 'email': email + } + self.env['res.partner'].create(vals) + + +class SlackUsersLines(models.Model): + _name = 'res.company.slack.users' + _description = 'Slack users' + + name = fields.Char(string="Name") + email = fields.Char(string="Email") + user = fields.Char(string="User ID") + res_company_id = fields.Many2one("res.company") + + +class SlackChannelLines(models.Model): + _name = 'res.company.slack.channels' + _description = 'Slack Channels' + + name = fields.Char(string="Name") + res_company_id = fields.Many2one("res.company") diff --git a/odoo_slack_connector/models/res_partner.py b/odoo_slack_connector/models/res_partner.py new file mode 100644 index 000000000..129edc501 --- /dev/null +++ b/odoo_slack_connector/models/res_partner.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + _description = 'Slack members' + + slack_user_id = fields.Char(string="Slack User ID") + is_slack_user = fields.Boolean("Slack User", default=False) diff --git a/odoo_slack_connector/models/res_users.py b/odoo_slack_connector/models/res_users.py new file mode 100644 index 000000000..f4ba1bc6c --- /dev/null +++ b/odoo_slack_connector/models/res_users.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models +import requests, json + + +class ResPartner(models.Model): + _inherit = 'res.users' + _description = 'Slack users' + + slack_user_id = fields.Char(string="Slack User ID") + is_slack_internal_users = fields.Boolean("Slack User", default=False) + + def sync_users(self): + """To load slack users""" + slack_internal_user_list = [] + + url1 = "https://slack.com/api/users.list" + company_record = self.env.user.company_id + payload = {} + headers = { + 'Authorization': 'Bearer ' + company_record.token + } + + users_response = requests.request("GET", url1, headers=headers, + data=payload) + users_response = users_response.__dict__['_content'] + dict_users = users_response.decode("UTF-8") + users = json.loads(dict_users) + for user_id in self: + slack_internal_user_list.append(user_id.slack_user_id) + + for rec in users['members']: + if rec['is_email_confirmed'] is True: + if 'email' in rec['profile']: + email = rec['profile']['email'] + else: + email = '' + if rec['id'] not in slack_internal_user_list: + vals = { + 'name': rec['real_name'], + 'slack_user_id': rec['id'], + 'is_slack_internal_users': True, + 'login': email, + } + self.create(vals) diff --git a/odoo_slack_connector/security/ir.model.access.csv b/odoo_slack_connector/security/ir.model.access.csv new file mode 100644 index 000000000..38f65d222 --- /dev/null +++ b/odoo_slack_connector/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_res_company_slack_users,access.res.company.slack.users,model_res_company_slack_users,base.group_user,1,1,1,1 +access_res_company_slack_channels,access.res.company.slack.channels,model_res_company_slack_channels,base.group_user,1,1,1,1 + + + + diff --git a/odoo_slack_connector/static/description/assets/icons/check.png b/odoo_slack_connector/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/check.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/chevron.png b/odoo_slack_connector/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/chevron.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/cogs.png b/odoo_slack_connector/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/cogs.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/consultation.png b/odoo_slack_connector/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/consultation.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/ecom-black.png b/odoo_slack_connector/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/education-black.png b/odoo_slack_connector/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/education-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/hotel-black.png b/odoo_slack_connector/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/license.png b/odoo_slack_connector/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/license.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/lifebuoy.png b/odoo_slack_connector/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/manufacturing-black.png b/odoo_slack_connector/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/pos-black.png b/odoo_slack_connector/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/pos-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/puzzle.png b/odoo_slack_connector/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/puzzle.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/restaurant-black.png b/odoo_slack_connector/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/service-black.png b/odoo_slack_connector/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/service-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/trading-black.png b/odoo_slack_connector/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/trading-black.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/training.png b/odoo_slack_connector/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/training.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/update.png b/odoo_slack_connector/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/update.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/user.png b/odoo_slack_connector/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/user.png differ diff --git a/odoo_slack_connector/static/description/assets/icons/wrench.png b/odoo_slack_connector/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_slack_connector/static/description/assets/icons/wrench.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/categories.png b/odoo_slack_connector/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/categories.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/check-box.png b/odoo_slack_connector/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/check-box.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/compass.png b/odoo_slack_connector/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/compass.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/corporate.png b/odoo_slack_connector/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/corporate.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/customer-support.png b/odoo_slack_connector/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/customer-support.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/cybrosys-logo.png b/odoo_slack_connector/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/features.png b/odoo_slack_connector/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/features.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/logo.png b/odoo_slack_connector/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/logo.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/pictures.png b/odoo_slack_connector/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/pictures.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/pie-chart.png b/odoo_slack_connector/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/right-arrow.png b/odoo_slack_connector/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/star.png b/odoo_slack_connector/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/star.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/support.png b/odoo_slack_connector/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/support.png differ diff --git a/odoo_slack_connector/static/description/assets/misc/whatsapp.png b/odoo_slack_connector/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_slack_connector/static/description/assets/modules/1.png b/odoo_slack_connector/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/1.png differ diff --git a/odoo_slack_connector/static/description/assets/modules/2.png b/odoo_slack_connector/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/2.png differ diff --git a/odoo_slack_connector/static/description/assets/modules/3.png b/odoo_slack_connector/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/3.png differ diff --git a/odoo_slack_connector/static/description/assets/modules/4.png b/odoo_slack_connector/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/4.png differ diff --git a/odoo_slack_connector/static/description/assets/modules/5.gif b/odoo_slack_connector/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/5.gif differ diff --git a/odoo_slack_connector/static/description/assets/modules/6.png b/odoo_slack_connector/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/modules/6.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/1.png b/odoo_slack_connector/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..a082db2c0 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/1.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/2.png b/odoo_slack_connector/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..deb8feaa3 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/2.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/3.png b/odoo_slack_connector/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..ed6ba96dc Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/3.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/4.png b/odoo_slack_connector/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..8d1bc252d Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/4.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/5.png b/odoo_slack_connector/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..e78373948 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/5.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/6.png b/odoo_slack_connector/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..900782508 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/6.png differ diff --git a/odoo_slack_connector/static/description/assets/screenshots/hero.gif b/odoo_slack_connector/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..ba9e673c6 Binary files /dev/null and b/odoo_slack_connector/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_slack_connector/static/description/banner.png b/odoo_slack_connector/static/description/banner.png new file mode 100644 index 000000000..b2c688334 Binary files /dev/null and b/odoo_slack_connector/static/description/banner.png differ diff --git a/odoo_slack_connector/static/description/icon.png b/odoo_slack_connector/static/description/icon.png new file mode 100644 index 000000000..423c98f95 Binary files /dev/null and b/odoo_slack_connector/static/description/icon.png differ diff --git a/odoo_slack_connector/static/description/index.html b/odoo_slack_connector/static/description/index.html new file mode 100644 index 000000000..3b7d2ade3 --- /dev/null +++ b/odoo_slack_connector/static/description/index.html @@ -0,0 +1,553 @@ +
+ +
+ +
+
+ Community +
+
+
+ + + +

Slack Odoo Connector

+

To Integrate Odoo with Slack

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module will help you to connect with slack to manage slack Conversations. + In addition it also help you to import slack channels and their members into Odoo +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + One click integration with slack +
+
+
+
+ + Send and Receive messages from public channels +
+
+
+
+ + Synchronizes messages from odoo to slack instantly +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Create New Slack App

+

+ Initially you need to goto this link https://api.slack.com/apps/ to create a slack app.

+ +
+ +
+

Add necessary permission to the app

+

+ To communicate with slack, you need to allow some permissions, for this go inside the slack app and navigate to the 'OAuth & Permissions'-->'Scopes'-->'User Token Scopes' and enable permissions such as 'mpim:read, im:read, groups:read, channels:read, chat:write, chat:write:user, chat:write:bot, users:read'. +

+ +
+ +
+

Generate Slack API Token

+

+ After assign necessary permission we need to reinstall the slack app in workspace again, then we can use 'User OAuth Token' to connect odoo with slack

+ +
+
+

Connecting with Slack

+

+ With the help of 'User OAuth Token' we can connect with slack, in result slack channels and their members will be loaded into odoo.

+ +
+
+

Auto Synchronization

+

+ Here we uses a scheduled action to Synchronize communication between slack and odoo.

+ +
+
+

Communicating with Slack channels

+

+ After assign necessary permission we need to reinstall the slack app in workspace again, then we can use 'User OAuth Token' to connect odoo with slack

+ +
+ +
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/odoo_slack_connector/views/mail_channel.xml b/odoo_slack_connector/views/mail_channel.xml new file mode 100644 index 000000000..db5debe3c --- /dev/null +++ b/odoo_slack_connector/views/mail_channel.xml @@ -0,0 +1,16 @@ + + + + + mail_channel_inherit_view + mail.channel + + + + + + + + + + \ No newline at end of file diff --git a/odoo_slack_connector/views/mail_message.xml b/odoo_slack_connector/views/mail_message.xml new file mode 100644 index 000000000..08b14332d --- /dev/null +++ b/odoo_slack_connector/views/mail_message.xml @@ -0,0 +1,15 @@ + + + + + mail_message_inherit_view + mail.message + + + + + + + + + \ No newline at end of file diff --git a/odoo_slack_connector/views/res_company.xml b/odoo_slack_connector/views/res_company.xml new file mode 100644 index 000000000..0c59e234f --- /dev/null +++ b/odoo_slack_connector/views/res_company.xml @@ -0,0 +1,48 @@ + + + + + res.company.for.inherit + res.company + + + + + + + + + + +