diff --git a/multi_sms_gateway/README.rst b/multi_sms_gateway/README.rst new file mode 100644 index 000000000..a4d28b38c --- /dev/null +++ b/multi_sms_gateway/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Multiple SMS Gateway Integration +================================ +* Module for sending SMS through different SMS gateways such as Twilio, Telesign, Vonage. + +Installation +============ +- www.odoo.com/documentation/17.0/setup/install.html +- Install all external dependencies +- Install our custom addon + +Configuration +============= +- Add the users to the new security group 'Multiple SMS Gateway Integration / Manager' to give access to +the new menus of Multiple SMS Gateway Integration module. +- Setup the gateways that you would like to use by adding the required credentials. + +License +------- +GNU Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Sumith S, + (V17) Anjana PV, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/multi_sms_gateway/__init__.py b/multi_sms_gateway/__init__.py new file mode 100644 index 000000000..3914605a9 --- /dev/null +++ b/multi_sms_gateway/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import wizard diff --git a/multi_sms_gateway/__manifest__.py b/multi_sms_gateway/__manifest__.py new file mode 100644 index 000000000..2c13244da --- /dev/null +++ b/multi_sms_gateway/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Multiple SMS Gateway Integration', + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Module to send SMS through different SMS gateway', + 'description': """This modules helps to send SMS using different SMS + gateways including Twilio, Vonage, TeleSign""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'contacts'], + 'data': [ + 'security/multi_sms_gateway_groups.xml', + 'security/sms_history_security.xml', + 'security/ir.model.access.csv', + 'data/sms_gateway_data.xml', + 'views/sms_history_views.xml', + 'views/sms_gateway_config_views.xml', + 'views/res_partner_views.xml', + 'wizard/send_sms_views.xml', + 'views/multi_sms_gateway_menus.xml' + ], + 'external_dependencies': { + 'python': ['telesign', 'twilio', 'vonage'] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/multi_sms_gateway/data/sms_gateway_data.xml b/multi_sms_gateway/data/sms_gateway_data.xml new file mode 100644 index 000000000..2a3c4377f --- /dev/null +++ b/multi_sms_gateway/data/sms_gateway_data.xml @@ -0,0 +1,13 @@ + + + + + twilio + + + vonage + + + telesign + + diff --git a/multi_sms_gateway/doc/RELEASE_NOTES.md b/multi_sms_gateway/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..660eb6944 --- /dev/null +++ b/multi_sms_gateway/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 29.07.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Multiple SMS Gateway Integration \ No newline at end of file diff --git a/multi_sms_gateway/models/__init__.py b/multi_sms_gateway/models/__init__.py new file mode 100644 index 000000000..8698f5f91 --- /dev/null +++ b/multi_sms_gateway/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import res_partner +from . import sms_gateway +from . import sms_gateway_config +from . import sms_history diff --git a/multi_sms_gateway/models/res_partner.py b/multi_sms_gateway/models/res_partner.py new file mode 100644 index 000000000..887e78f77 --- /dev/null +++ b/multi_sms_gateway/models/res_partner.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, _ + + +class ResPartner(models.Model): + """ + Inheriting model 'res.partner' to add the function to send SMS. + Methods: + send_sms(): + Opens the Send SMS wizard. + """ + _inherit = 'res.partner' + + def send_sms(self): + """ + Function to open Send SMS wizard. + Returns: + dict: the action window of 'send.sms'. + """ + record_ids = self.env.context.get('active_ids') + numbers = self.env['res.partner'].browse(record_ids).mapped('mobile') + return { + 'name': _('Send SMS'), + 'type': 'ir.actions.act_window', + 'res_model': 'send.sms', + 'context': { + 'default_sms_to': ','.join([str(numb) for numb in numbers]), + }, + 'view_mode': 'form', + 'target': 'new' + } diff --git a/multi_sms_gateway/models/sms_gateway.py b/multi_sms_gateway/models/sms_gateway.py new file mode 100644 index 000000000..c00a5703e --- /dev/null +++ b/multi_sms_gateway/models/sms_gateway.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SmsGateway(models.Model): + """ + Class to add the gateway providers. + """ + _name = 'sms.gateway' + _description = 'SMS Gateway' + + name = fields.Char(string='Provider Name', + help='Provide the name of the provider.') diff --git a/multi_sms_gateway/models/sms_gateway_config.py b/multi_sms_gateway/models/sms_gateway_config.py new file mode 100644 index 000000000..3120edf84 --- /dev/null +++ b/multi_sms_gateway/models/sms_gateway_config.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class SmsGatewayConfig(models.Model): + """ + Class to save the user credential details for the SMS gateways. + """ + _name = 'sms.gateway.config' + _description = 'SMS Gateway Configuration' + _rec_name = 'gateway_name' + + sms_gateway_id = fields.Many2one( + 'sms.gateway', string='Gateway', help='The SMS Gateway.') + gateway_name = fields.Char( + related='sms_gateway_id.name', help='Gateway Name') + vonage_key = fields.Char(string='Key', help='The key for Vonage') + vonage_secret = fields.Char(string='Secret', help='The secret for Vonage.') + twilio_account_sid = fields.Char( + string='Account SID', help='Account SID for Twilio.') + twilio_auth_token = fields.Char( + string='Auth Token', help='Auth token for Twilio.') + twilio_phone_number = fields.Char( + string='Twilio Number', help='Twilio phone number.') + telesign_customer = fields.Char( + string='TeleSign Customer ID', help='Customer ID for TeleSign.') + telesign_api_key = fields.Char( + string='TeleSign API Key', help='API key for TeleSign') + + @api.constrains('sms_gateway_id') + def _check_credentials(self): + """ Check whether all the credential field have values""" + if self.sms_gateway_id.name == 'telesign': + if not self.telesign_customer or not self.telesign_api_key: + raise UserError( + _('Provide correct credentials for Telesign')) + if self.sms_gateway_id.name == 'vonage': + if not self.vonage_key or not self.vonage_secret: + raise UserError( + _('Provide correct credentials for Vonage')) + if self.sms_gateway_id.name == 'twilio': + if (not self.twilio_phone_number or not self.twilio_auth_token + or not self.twilio_account_sid): + raise UserError( + _('Provide correct credentials for Twilio')) diff --git a/multi_sms_gateway/models/sms_history.py b/multi_sms_gateway/models/sms_history.py new file mode 100644 index 000000000..87eaa50dd --- /dev/null +++ b/multi_sms_gateway/models/sms_history.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SmsHistory(models.Model): + """ + This model stores the details of all the SMS messages that have been + sent, including the gateway name, date of sending, mobile phone number, + and SMS text. + """ + _name = 'sms.history' + _description = 'SMS History' + _rec_name = 'sms_mobile' + + sms_gateway_id = fields.Many2one('sms.gateway', string='Gateway', + help='The SMS Gateway.') + sms_date = fields.Datetime(string='Date', default=fields.Date().today(), + help='Date of sending message(current day).') + sms_mobile = fields.Char( + string='Mobile Number', help='Phone Number to send SMS.') + sms_text = fields.Text(string='SMS Text', help='The message to be sent.') + company_id = fields.Many2one( + 'res.company', string='Company', required=True, + default=lambda self: self.env.company, help='Active company.') diff --git a/multi_sms_gateway/security/ir.model.access.csv b/multi_sms_gateway/security/ir.model.access.csv new file mode 100644 index 000000000..d9d726d16 --- /dev/null +++ b/multi_sms_gateway/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_sms_gateway_config_manager,access.sms.gateway.config.manager,model_sms_gateway_config,multi_sms_gateway.multi_sms_gateway_group_manager,1,1,1,1 +access_send_sms_manager,access.send.sms.manager,model_send_sms,multi_sms_gateway.multi_sms_gateway_group_manager,1,1,1,1 +access_sms_gateway_manager,access.sms.gateway.manager,model_sms_gateway,multi_sms_gateway.multi_sms_gateway_group_manager,1,1,1,1 +access_sms_history_manager,access.sms.history.manager,model_sms_history,multi_sms_gateway.multi_sms_gateway_group_manager,1,1,1,1 diff --git a/multi_sms_gateway/security/multi_sms_gateway_groups.xml b/multi_sms_gateway/security/multi_sms_gateway_groups.xml new file mode 100644 index 000000000..55dae5de0 --- /dev/null +++ b/multi_sms_gateway/security/multi_sms_gateway_groups.xml @@ -0,0 +1,14 @@ + + + + + Multiple SMS Gateway Integration + Manage user access for Multiple SMS Gateway Integration module + 20 + + + Manager + + Access to the new menus and records of Multiple SMS Gateway Integration + + diff --git a/multi_sms_gateway/security/sms_history_security.xml b/multi_sms_gateway/security/sms_history_security.xml new file mode 100644 index 000000000..07802a039 --- /dev/null +++ b/multi_sms_gateway/security/sms_history_security.xml @@ -0,0 +1,9 @@ + + + + + SMS History: Multi-company + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + \ No newline at end of file diff --git a/multi_sms_gateway/static/description/assets/icons/check.png b/multi_sms_gateway/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/check.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/chevron.png b/multi_sms_gateway/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/chevron.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/cogs.png b/multi_sms_gateway/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/cogs.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/consultation.png b/multi_sms_gateway/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/consultation.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/ecom-black.png b/multi_sms_gateway/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/ecom-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/education-black.png b/multi_sms_gateway/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/education-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/hotel-black.png b/multi_sms_gateway/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/hotel-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/license.png b/multi_sms_gateway/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/license.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/lifebuoy.png b/multi_sms_gateway/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/lifebuoy.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/manufacturing-black.png b/multi_sms_gateway/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/manufacturing-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/pos-black.png b/multi_sms_gateway/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/pos-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/puzzle.png b/multi_sms_gateway/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/puzzle.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/restaurant-black.png b/multi_sms_gateway/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/restaurant-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/service-black.png b/multi_sms_gateway/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/service-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/trading-black.png b/multi_sms_gateway/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/trading-black.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/training.png b/multi_sms_gateway/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/training.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/update.png b/multi_sms_gateway/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/update.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/user.png b/multi_sms_gateway/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/user.png differ diff --git a/multi_sms_gateway/static/description/assets/icons/wrench.png b/multi_sms_gateway/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/multi_sms_gateway/static/description/assets/icons/wrench.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/categories.png b/multi_sms_gateway/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/categories.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/check-box.png b/multi_sms_gateway/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/check-box.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/compass.png b/multi_sms_gateway/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/compass.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/corporate.png b/multi_sms_gateway/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/corporate.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/customer-support.png b/multi_sms_gateway/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/customer-support.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/cybrosys-logo.png b/multi_sms_gateway/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/cybrosys-logo.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/features.png b/multi_sms_gateway/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/features.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/logo.png b/multi_sms_gateway/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/logo.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/pictures.png b/multi_sms_gateway/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/pictures.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/pie-chart.png b/multi_sms_gateway/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/pie-chart.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/right-arrow.png b/multi_sms_gateway/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/right-arrow.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/star.png b/multi_sms_gateway/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/star.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/support.png b/multi_sms_gateway/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/support.png differ diff --git a/multi_sms_gateway/static/description/assets/misc/whatsapp.png b/multi_sms_gateway/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/misc/whatsapp.png differ diff --git a/multi_sms_gateway/static/description/assets/modules/1.jpg b/multi_sms_gateway/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/1.jpg differ diff --git a/multi_sms_gateway/static/description/assets/modules/2.jpg b/multi_sms_gateway/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..87c2bb2ba Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/2.jpg differ diff --git a/multi_sms_gateway/static/description/assets/modules/3.png b/multi_sms_gateway/static/description/assets/modules/3.png new file mode 100644 index 000000000..a5299d338 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/3.png differ diff --git a/multi_sms_gateway/static/description/assets/modules/4.png b/multi_sms_gateway/static/description/assets/modules/4.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/4.png differ diff --git a/multi_sms_gateway/static/description/assets/modules/5.jpg b/multi_sms_gateway/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..6a102f103 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/5.jpg differ diff --git a/multi_sms_gateway/static/description/assets/modules/6.jpg b/multi_sms_gateway/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..eaf13fef5 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/modules/6.jpg differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/hero.gif b/multi_sms_gateway/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..bd5f03640 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/hero.gif differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway01.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway01.png new file mode 100644 index 000000000..a3ab39eee Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway01.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway1.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway1.png new file mode 100644 index 000000000..947ca7fde Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway1.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway10.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway10.png new file mode 100644 index 000000000..0c2794c9e Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway10.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway11.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway11.png new file mode 100644 index 000000000..157edab3d Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway11.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway12.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway12.png new file mode 100644 index 000000000..58a821ed3 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway12.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway13.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway13.png new file mode 100644 index 000000000..c1e1dbde2 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway13.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway2.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway2.png new file mode 100644 index 000000000..358b17454 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway2.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway3.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway3.png new file mode 100644 index 000000000..c4d0959e0 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway3.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway4.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway4.png new file mode 100644 index 000000000..5cc99c5a6 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway4.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway5.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway5.png new file mode 100644 index 000000000..af8d5c10b Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway5.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway6.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway6.png new file mode 100644 index 000000000..ae7ed2d23 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway6.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway7.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway7.png new file mode 100644 index 000000000..6752a4fb5 Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway7.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway8.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway8.png new file mode 100644 index 000000000..2ee3342da Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway8.png differ diff --git a/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway9.png b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway9.png new file mode 100644 index 000000000..ad2794beb Binary files /dev/null and b/multi_sms_gateway/static/description/assets/screenshots/multi_sms_gateway9.png differ diff --git a/multi_sms_gateway/static/description/banner.jpg b/multi_sms_gateway/static/description/banner.jpg new file mode 100644 index 000000000..d3007c70f Binary files /dev/null and b/multi_sms_gateway/static/description/banner.jpg differ diff --git a/multi_sms_gateway/static/description/icon.png b/multi_sms_gateway/static/description/icon.png new file mode 100644 index 000000000..1e37a8c17 Binary files /dev/null and b/multi_sms_gateway/static/description/icon.png differ diff --git a/multi_sms_gateway/static/description/index.html b/multi_sms_gateway/static/description/index.html new file mode 100644 index 000000000..949e446ba --- /dev/null +++ b/multi_sms_gateway/static/description/index.html @@ -0,0 +1,1487 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Multiple SMS Gateway Integration

+

+ Send SMS Through Different SMS Gateways

+ +
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Send SMS through different Gateway.

+
+
+
+
+
+
+ +
+
+

+ Can see all the SMS history send through the Gateway

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

+ Set the user as Manager +

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

+ Configure SMS gateways +

+
+
+
+
+
+
+ + +
+
+

+ Create account in Vonage +

+

+ Click here +

+
+
+
+
+
+
+ + +
+
+

+ Collect the credentials from Vonage API Dashboard +

+
+
+
+
+
+
+ +
+
+

+ Configure Vonage SMS gateway using the credentials. +

+

+ Settings >> SMS Gateway >> Gateway List +

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

+ Access the Send SMS option from the Contacts +

+
+
+
+ +
+
+
+ +
+
+

+ Send SMS using Vonage +

+
+
+
+ +
+
+
+ +
+
+

+ Create a account in Twilio +

+

+ Click here +

+
+
+
+ +
+
+
+ +
+
+

+ Get credentials. +

+
+
+
+ +
+
+
+ +
+
+

+ Configure the SMS Gateway for Twilio. +

+
+
+
+ +
+
+
+ +
+
+

+ Send SMS using Twilio. +

+
+
+
+ +
+
+
+ +
+
+

+ Create account in Telesign +

+

+ Click here +

+
+
+
+ +
+
+
+ +
+
+

+ Configure the SMS Gateway for Telesign +

+
+
+
+ +
+
+
+ +
+
+

+ Send SMS using Telesign +

+
+
+
+ + +
+ +
+
+
    +
  • + + Simple configuration. +
  • +
  • + + M-Pesa Payment on the go. +
  • + +
  • + + Success/failure popup with proper information. +
  • +
+
+
+ +
+
+
+
Version + 17.0.1.0.0|Released on: 8th January 2024 +
+

+ + Initial Commit for Restrict POS Refund with + Password.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/multi_sms_gateway/views/multi_sms_gateway_menus.xml b/multi_sms_gateway/views/multi_sms_gateway_menus.xml new file mode 100644 index 000000000..eb5e80a9b --- /dev/null +++ b/multi_sms_gateway/views/multi_sms_gateway_menus.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/multi_sms_gateway/views/res_partner_views.xml b/multi_sms_gateway/views/res_partner_views.xml new file mode 100644 index 000000000..403cd3f3e --- /dev/null +++ b/multi_sms_gateway/views/res_partner_views.xml @@ -0,0 +1,13 @@ + + + + + + Send SMS + + + form,list + code + action = records.send_sms() + + diff --git a/multi_sms_gateway/views/sms_gateway_config_views.xml b/multi_sms_gateway/views/sms_gateway_config_views.xml new file mode 100644 index 000000000..c4d164ed4 --- /dev/null +++ b/multi_sms_gateway/views/sms_gateway_config_views.xml @@ -0,0 +1,74 @@ + + + + + sms.gateway.config.view.form + sms.gateway.config + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + sms.gateway.config.view.tree + sms.gateway.config + + + + + + + + + SMS Gateway Configuration + sms.gateway.config + +

+ Gateway List Is Empty +

+

+ Create a New Gateway List +

+
+
+
diff --git a/multi_sms_gateway/views/sms_history_views.xml b/multi_sms_gateway/views/sms_history_views.xml new file mode 100644 index 000000000..cc0fd19e7 --- /dev/null +++ b/multi_sms_gateway/views/sms_history_views.xml @@ -0,0 +1,47 @@ + + + + + sms.history.view.form + sms.history + +
+ + + + + + + + + + + + +
+
+
+ + + sms.history.view.tree + sms.history + + + + + + + + + + + + SMS History + sms.history + +

+ SMS history is not created yet! Please send an SMS to create new history. +

+
+
+
diff --git a/multi_sms_gateway/wizard/__init__.py b/multi_sms_gateway/wizard/__init__.py new file mode 100644 index 000000000..c1c081e81 --- /dev/null +++ b/multi_sms_gateway/wizard/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import send_sms diff --git a/multi_sms_gateway/wizard/send_sms.py b/multi_sms_gateway/wizard/send_sms.py new file mode 100644 index 000000000..ec2bb52af --- /dev/null +++ b/multi_sms_gateway/wizard/send_sms.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import vonage +from telesign.messaging import MessagingClient +from twilio.rest import Client +from odoo import fields, models, _ +from odoo.exceptions import UserError + + +class SendSms(models.TransientModel): + """ + Class for the wizard to send SMS. + Methods: + action_send_sms(): + Button action to send SMS. + """ + _name = 'send.sms' + _description = 'Wizard to send SMS' + + sms_id = fields.Many2one('sms.gateway.config', string='Connection ID', + help='Gateway record with credentials') + sms_to = fields.Char(string='Send To', + help='Enter the number to send the SMS') + text = fields.Text(string='Text', required=True, + help='Enter the text for the SMS') + + def action_send_sms(self): + """ + Function to send SMS using different SMS gateway + """ + if self.sms_id.gateway_name == 'vonage': + client = vonage.Client(key=self.sms_id.vonage_key, + secret=self.sms_id.vonage_secret) + vonage.Sms(client) + for number in self.sms_to.split(','): + if number: + client.sms.send_message( + { + "from": 'Vonage APIs', + "to": number, + "text": self.text + } + ) + elif self.sms_id.gateway_name == 'twilio': + client = Client(self.sms_id.twilio_account_sid, + self.sms_id.twilio_auth_token) + for number in self.sms_to.split(','): + if number: + try: + client.messages.create( + body=self.text, + from_=int(self.sms_id.twilio_phone_number), + to=number + ) + except: + raise UserError( + _('Provide correct credentials')) + elif self.sms_id.gateway_name == 'telesign': + for number in self.sms_to.split(','): + if number: + messaging = MessagingClient( + self.sms_id.telesign_customer, + self.sms_id.telesign_api_key) + messaging.message(number, self.text, 'ARN') + self.env['sms.history'].sudo().create({ + 'sms_gateway_id': self.sms_id.sms_gateway_id.id, + 'sms_mobile': self.sms_to, + 'sms_text': self.text + }) diff --git a/multi_sms_gateway/wizard/send_sms_views.xml b/multi_sms_gateway/wizard/send_sms_views.xml new file mode 100644 index 000000000..02b7d7055 --- /dev/null +++ b/multi_sms_gateway/wizard/send_sms_views.xml @@ -0,0 +1,29 @@ + + + + + send.sms.view.form + send.sms + + +
+ + + + + + + + + + + + +
+
+
+