diff --git a/clicksend_sms_odoo/README.rst b/clicksend_sms_odoo/README.rst new file mode 100644 index 000000000..7eb81f99f --- /dev/null +++ b/clicksend_sms_odoo/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +ClickSend SMS Integration +========================= +* Odoo -Integration with ClickSend SMS Gateway + +Installation +============ +- www.odoo.com/documentation/15.0/setup/install.html +- Install our custom addon + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/15.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V15) Raveena V, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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/clicksend_sms_odoo/__init__.py b/clicksend_sms_odoo/__init__.py new file mode 100644 index 000000000..3dffd32db --- /dev/null +++ b/clicksend_sms_odoo/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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/clicksend_sms_odoo/__manifest__.py b/clicksend_sms_odoo/__manifest__.py new file mode 100644 index 000000000..14a8a5298 --- /dev/null +++ b/clicksend_sms_odoo/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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': "ClickSend SMS Integration", + 'version': '15.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'ClickSend SMS Gateway Integration', + 'description': """You can send SMS to a group, partner or anyone + using this Module through ClickSend SMS Gateway.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['contacts', 'sms'], + 'data': [ + 'security/ir.model.access.csv', + 'views/res_config_settings_views.xml', + 'views/sms_history_views.xml', + 'views/sms_group_views.xml', + 'wizard/send_sms_views.xml', + ], + 'external_dependencies': { + 'python': ['clicksend_client'], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/clicksend_sms_odoo/doc/RELEASE_NOTES.md b/clicksend_sms_odoo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..87be45787 --- /dev/null +++ b/clicksend_sms_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 05.08.2023 +#### Version 15.0.1.0.0 +### ADD +- Initial Commit for ClickSend SMS Integration diff --git a/clicksend_sms_odoo/models/__init__.py b/clicksend_sms_odoo/models/__init__.py new file mode 100644 index 000000000..43a9d7e73 --- /dev/null +++ b/clicksend_sms_odoo/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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_config_settings +from . import sms_group +from . import sms_history diff --git a/clicksend_sms_odoo/models/res_config_settings.py b/clicksend_sms_odoo/models/res_config_settings.py new file mode 100644 index 000000000..1a4ea66f8 --- /dev/null +++ b/clicksend_sms_odoo/models/res_config_settings.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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 + + +class ResConfigSettings(models.TransientModel): + """This class inherits res config settings model to add the settings + for clicksend sms gateway""" + _inherit = 'res.config.settings' + + username = fields.Char(string="Username", + help="Your username of ClickSend account") + api_key = fields.Char(string="API Key", + help="You will get the API key from ClickSend") + + @api.model + def get_values(self): + """ This function will super the getter method to get the values of + username and api_key""" + res = super(ResConfigSettings, self).get_values() + username = self.env['ir.config_parameter'].sudo(). \ + get_param('clicksend_sms_odoo.username') + api_key = self.env['ir.config_parameter'].sudo(). \ + get_param('clicksend_sms_odoo.api_key') + res.update( + username=username, + api_key=api_key, + ) + return res + + def set_values(self): + """ This function will super the setter method to set the values of + username and api_key""" + super(ResConfigSettings, self).set_values() + param = self.env['ir.config_parameter'].sudo() + param.set_param('clicksend_sms_odoo.username', self.username) + param.set_param('clicksend_sms_odoo.api_key', self.api_key) diff --git a/clicksend_sms_odoo/models/sms_group.py b/clicksend_sms_odoo/models/sms_group.py new file mode 100644 index 000000000..ba24318cf --- /dev/null +++ b/clicksend_sms_odoo/models/sms_group.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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 SmsGroup(models.Model): + """A Model for SMS groups""" + _name = 'sms.group' + _description = 'SMS Group for Sending Sms To a Group' + + name = fields.Char(string="Name", required=True, + help="Name of the SMS group") + partner_ids = fields.Many2many('res.partner', string='Partners', + required=True, help="Group members") + description = fields.Text(string="Description", + help="Short description about the SMS group") diff --git a/clicksend_sms_odoo/models/sms_history.py b/clicksend_sms_odoo/models/sms_history.py new file mode 100644 index 000000000..33aad0642 --- /dev/null +++ b/clicksend_sms_odoo/models/sms_history.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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 + + +class SmsHistory(models.Model): + """A model for SMS history""" + _name = 'sms.history' + _description = "SMS History of Sent Sms" + + name = fields.Char(string="Name", help="Name of the Receiver") + number = fields.Char(string='Number', help="Mobile number of the Receiver") + state = fields.Selection([('outgoing', 'In Queue'), + ('sent', 'Sent'), + ('canceled', 'Canceled') + ], string='SMS Status', readonly=True, + help="State of SMS") + message = fields.Text(string="Message", help="SMS Message") + + @api.model + def create(self, vals): + """Create a new SmsHistory record with the provided values.""" + record = super(SmsHistory, self).create(vals) + return record diff --git a/clicksend_sms_odoo/security/ir.model.access.csv b/clicksend_sms_odoo/security/ir.model.access.csv new file mode 100644 index 000000000..92c76d8cb --- /dev/null +++ b/clicksend_sms_odoo/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_send_sms,access.send.sms,model_send_sms,base.group_user,1,1,1,1 +access_sms_group,access.sms.group,model_sms_group,base.group_user,1,1,1,1 +access_sms_history,access.sms.history,model_sms_history,base.group_user,1,1,1,1 diff --git a/clicksend_sms_odoo/static/description/assets/icons/check.png b/clicksend_sms_odoo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/check.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/chevron.png b/clicksend_sms_odoo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/chevron.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/cogs.png b/clicksend_sms_odoo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/cogs.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/consultation.png b/clicksend_sms_odoo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/consultation.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/ecom-black.png b/clicksend_sms_odoo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/education-black.png b/clicksend_sms_odoo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/education-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/hotel-black.png b/clicksend_sms_odoo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/license.png b/clicksend_sms_odoo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/license.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/lifebuoy.png b/clicksend_sms_odoo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/manufacturing-black.png b/clicksend_sms_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/pos-black.png b/clicksend_sms_odoo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/pos-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/puzzle.png b/clicksend_sms_odoo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/puzzle.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/restaurant-black.png b/clicksend_sms_odoo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/service-black.png b/clicksend_sms_odoo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/service-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/trading-black.png b/clicksend_sms_odoo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/trading-black.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/training.png b/clicksend_sms_odoo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/training.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/update.png b/clicksend_sms_odoo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/update.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/user.png b/clicksend_sms_odoo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/user.png differ diff --git a/clicksend_sms_odoo/static/description/assets/icons/wrench.png b/clicksend_sms_odoo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/icons/wrench.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/categories.png b/clicksend_sms_odoo/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/categories.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/check-box.png b/clicksend_sms_odoo/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/check-box.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/compass.png b/clicksend_sms_odoo/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/compass.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/corporate.png b/clicksend_sms_odoo/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/corporate.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/customer-support.png b/clicksend_sms_odoo/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/customer-support.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/cybrosys-logo.png b/clicksend_sms_odoo/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/cybrosys-logo.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/features.png b/clicksend_sms_odoo/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/features.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/logo.png b/clicksend_sms_odoo/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/logo.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/pictures.png b/clicksend_sms_odoo/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/pictures.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/pie-chart.png b/clicksend_sms_odoo/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/pie-chart.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/right-arrow.png b/clicksend_sms_odoo/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/right-arrow.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/star.png b/clicksend_sms_odoo/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/star.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/support.png b/clicksend_sms_odoo/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/support.png differ diff --git a/clicksend_sms_odoo/static/description/assets/misc/whatsapp.png b/clicksend_sms_odoo/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/misc/whatsapp.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/1.png b/clicksend_sms_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/1.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/2.png b/clicksend_sms_odoo/static/description/assets/modules/2.png new file mode 100644 index 000000000..baaef2807 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/2.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/3.png b/clicksend_sms_odoo/static/description/assets/modules/3.png new file mode 100644 index 000000000..04d502e26 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/3.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/4.png b/clicksend_sms_odoo/static/description/assets/modules/4.png new file mode 100644 index 000000000..d01ceb1ab Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/4.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/5.png b/clicksend_sms_odoo/static/description/assets/modules/5.png new file mode 100644 index 000000000..230d4dcb3 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/5.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/6.png b/clicksend_sms_odoo/static/description/assets/modules/6.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/6.png differ diff --git a/clicksend_sms_odoo/static/description/banner.png b/clicksend_sms_odoo/static/description/banner.png new file mode 100644 index 000000000..b079730a5 Binary files /dev/null and b/clicksend_sms_odoo/static/description/banner.png differ diff --git a/clicksend_sms_odoo/static/description/icon.png b/clicksend_sms_odoo/static/description/icon.png new file mode 100644 index 000000000..8515520e9 Binary files /dev/null and b/clicksend_sms_odoo/static/description/icon.png differ diff --git a/clicksend_sms_odoo/static/description/images/checked.png b/clicksend_sms_odoo/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/checked.png differ diff --git a/clicksend_sms_odoo/static/description/images/cybrosys.png b/clicksend_sms_odoo/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/cybrosys.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/1.png b/clicksend_sms_odoo/static/description/images/screenshots/1.png new file mode 100644 index 000000000..0321df93d Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/1.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/10.png b/clicksend_sms_odoo/static/description/images/screenshots/10.png new file mode 100644 index 000000000..8a75b62ea Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/10.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/2.png b/clicksend_sms_odoo/static/description/images/screenshots/2.png new file mode 100644 index 000000000..13226b7a6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/2.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/3.png b/clicksend_sms_odoo/static/description/images/screenshots/3.png new file mode 100644 index 000000000..8e85457b6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/3.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/4.png b/clicksend_sms_odoo/static/description/images/screenshots/4.png new file mode 100644 index 000000000..2783ec1eb Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/4.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/5.png b/clicksend_sms_odoo/static/description/images/screenshots/5.png new file mode 100644 index 000000000..ba7b73ee7 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/5.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/6.png b/clicksend_sms_odoo/static/description/images/screenshots/6.png new file mode 100644 index 000000000..eec7fc808 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/6.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/7.png b/clicksend_sms_odoo/static/description/images/screenshots/7.png new file mode 100644 index 000000000..7ef00ea88 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/7.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/8.png b/clicksend_sms_odoo/static/description/images/screenshots/8.png new file mode 100644 index 000000000..c33de02e6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/8.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/9.png b/clicksend_sms_odoo/static/description/images/screenshots/9.png new file mode 100644 index 000000000..a2a398e8e Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/9.png differ diff --git a/clicksend_sms_odoo/static/description/images/screenshots/hero.gif b/clicksend_sms_odoo/static/description/images/screenshots/hero.gif new file mode 100644 index 000000000..e202d9987 Binary files /dev/null and b/clicksend_sms_odoo/static/description/images/screenshots/hero.gif differ diff --git a/clicksend_sms_odoo/static/description/index.html b/clicksend_sms_odoo/static/description/index.html new file mode 100644 index 000000000..c73008826 --- /dev/null +++ b/clicksend_sms_odoo/static/description/index.html @@ -0,0 +1,790 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+ +

+ ClickSend SMS Integration

+

+ You can Send SMS to a Group, Partner or Anyone Using This + Module. + +

+
+
+
+ +
+
+ +
+

+ Explore This Module

+
+ + + + + + + +
+
+

+ Overview +

+
+ +
+

+ This Module Help you to Send SMS to a Group, Partner or + Anyone by Using ClickSend SMS Gateway.

+ +
+
+ +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Configure API Credentials

+

+ You can Configure the API Credentials from ClickSend + SMS Gateway

+
+
+ +
+
+ +
+
+

+ Create Groups and Send SMS

+

+ You can Create Different Groups and Send SMS to all the + Group Members by Just One Click.

+
+
+ +
+
+ +
+
+

+ Send SMS to a Partner

+

+ If you Want to Send SMS to a Partner, You can Simply + Select that Partner Add the Message and Send.

+
+
+ +
+
+ +
+
+

+ Send SMS to Anyone.

+

+ You can Enter any Valid Mobile Number and Send SMS by + Using this Module.

+
+
+ +
+
+
+

+ Configuration +

+
+ +
+

+ This module requires the clicksend_client python library. + You can use the following command to install it.
pip + install clicksend-client +

+ +
+
+
+
+

+ Screenshots +

+
+ +
+

+ Configure the API Credentials.

+

+ You can enter your ClickSend API Credentials as Username + and API Key.

+ + +
+ +
+

+ Create SMS Groups

+

+ You can Create and View Groups from the Configuration. +

+ + +
+ + +
+

+ SMS Groups

+

+ You can Add Partners as Group Members. +

+ +
+
+

+ Send SMS to a Group

+

+ If you want to Send SMS to a Group of Partners, you can + Click on the 'Send SMS to a Group' Menu.

+ +
+
+

+ Send SMS.

+

+ You can Choose Group from the Popup Window then it will + show all the Partners from that Group. Enter the Message + and you can Send it by the Send Button

+ +
+
+

+ Send SMS to Partner

+

+ If you want to Send SMS to a Partner, you can Click on the + 'Send SMS to a Partner' Menu.

+ +
+
+

+ Send SMS

+

+ You can Select a Partner, Enter the Message and Send + SMS.

+ +
+
+

+ Send SMS to Anyone.

+

+ If you want to Send SMS to Anyone, you can Click on the + 'Send SMS to Anyone' menu.

+ +
+
+

+ Send SMS.

+

+ You can Enter a Valid Phone Number, Name, Message and Send + SMS.

+ +
+
+

+ SMS History

+

+ You can see the Sms History with Status.

+ +
+ +
+ + +
+
+

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/clicksend_sms_odoo/views/res_config_settings_views.xml b/clicksend_sms_odoo/views/res_config_settings_views.xml new file mode 100644 index 000000000..bb3fdcc65 --- /dev/null +++ b/clicksend_sms_odoo/views/res_config_settings_views.xml @@ -0,0 +1,67 @@ + + + + + + res.conf.settings.view.form.inherit.clicksend_sms_odoo + + res.config.settings + + + +
+

API Credentials

+
+
+
+
+
+ Username of your ClickSend Account +
+
+ +
+
+
+
+
+
+
+
+ Enter your API Key for ClickSend +
+
+ +
+
+
+
+ +
+
+
+
+ + + Settings + ir.actions.act_window + res.config.settings + + form + inline + {'module' : 'clicksend_sms_odoo'} + +
diff --git a/clicksend_sms_odoo/views/sms_group_views.xml b/clicksend_sms_odoo/views/sms_group_views.xml new file mode 100644 index 000000000..06ac05003 --- /dev/null +++ b/clicksend_sms_odoo/views/sms_group_views.xml @@ -0,0 +1,48 @@ + + + + + sms.group.view.form + sms.group + +
+ +

+ +

+ + + + + + + + + +
+
+
+
+ + + SMS + sms.group + tree,form + +

+ No groups found. Let's create one! +

+
+
+ + + + + +
diff --git a/clicksend_sms_odoo/views/sms_history_views.xml b/clicksend_sms_odoo/views/sms_history_views.xml new file mode 100644 index 000000000..e0b923254 --- /dev/null +++ b/clicksend_sms_odoo/views/sms_history_views.xml @@ -0,0 +1,58 @@ + + + + + sms.history.view.form + sms.history + +
+ +

+ +

+ + + + + + + + + + +
+
+
+
+ + + sms.history.view.tree + sms.history + + + + + + + + + + + + SMS History + sms.history + {'create': False, 'edit': False} + tree,form + +

+ No SMS history found. Let's create one! +

+
+
+ + +
diff --git a/clicksend_sms_odoo/wizard/__init__.py b/clicksend_sms_odoo/wizard/__init__.py new file mode 100644 index 000000000..fc1c05468 --- /dev/null +++ b/clicksend_sms_odoo/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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/clicksend_sms_odoo/wizard/send_sms.py b/clicksend_sms_odoo/wizard/send_sms.py new file mode 100644 index 000000000..81addee34 --- /dev/null +++ b/clicksend_sms_odoo/wizard/send_sms.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raveena V (odoo@cybrosys.com) +# +# 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 __future__ import print_function +import clicksend_client +import logging +from ast import literal_eval +from clicksend_client import SmsMessage +from odoo import fields, models, _ +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class SendSms(models.TransientModel): + """This Transient model will read all the user inputs and sends sms""" + _name = 'send.sms' + _description = "Send SMS for a Partner ,Group or Anyone" + + number = fields.Char(string='Number', related='partner_id.phone', + readonly=False, + store=True, help="Phone number of the Partner") + name = fields.Char(string="Name", help="Name of the Receiver") + partner_id = fields.Many2one('res.partner', string="Partner", + help="Receiver name") + message = fields.Text(string='Message', help="Content of the SMS Message") + group_id = fields.Many2one('sms.group', string='Group', + help="Choose a group to send the sms") + partner_ids = fields.Many2many('res.partner', string="Partners", + help="The partners to send SMS", + related='group_id.partner_ids') + + def action_send_sms(self): + """Send an SMS message using the ClickSend API.""" + username = self.env['ir.config_parameter'].sudo().get_param( + 'clicksend_sms_odoo.username') + password = self.env['ir.config_parameter'].sudo().get_param( + 'clicksend_sms_odoo.api_key') + if not username or not password: + raise UserError( + _("Please configure your ClickSend credentials")) + configuration = clicksend_client.Configuration() + configuration.username = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'clicksend_sms_odoo.username') + configuration.password = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'clicksend_sms_odoo.api_key') + num_list = [] + name_list = [] + number = False + api_instance = clicksend_client.SMSApi( + clicksend_client.ApiClient(configuration)) + if self.partner_id: + number = self.partner_id.phone + elif self.name and self.number: + number = self.number + elif self.group_id: + partner_ids = self.group_id.partner_ids + num_list = partner_ids.mapped('phone') + name_list = partner_ids.mapped('name') + if number: + sms_message = SmsMessage( + source="php", + body=self.message, + to=number, + schedule=1436874701) + sms_messages = clicksend_client.SmsMessageCollection( + messages=[sms_message]) + try: + api_response = api_instance.sms_send_post(sms_messages) + response = api_response.replace("\'", "\"") + response = literal_eval(response) + if response.get('response_code') == 'SUCCESS': + state = "sent" + else: + state = "canceled" + name = self.name if self.name else ( + self.partner_id.name if self.partner_id else "") + self.env['sms.history'].create({ + 'name': name, + 'number': number, + 'state': state, + 'message': self.message + }) + except Exception as e: + _logger.warning( + "Exception when calling SMSApi->sms_send_post: %s\n" % e) + elif num_list: + for num, name in zip(num_list, name_list): + sms_message = SmsMessage( + source="php", + body=self.message, + to=num, + schedule=1436874701 + ) + sms_messages = clicksend_client.SmsMessageCollection( + messages=[sms_message]) + try: + api_response = api_instance.sms_send_post(sms_messages) + response = api_response.replace("\'", "\"") + response = literal_eval(response) + if response.get('response_code') == 'SUCCESS': + state = "sent" + else: + state = "canceled" + self.env['sms.history'].create({ + 'name': name, + 'number': num, + 'state': state, + 'message': self.message + }) + except Exception as e: + _logger.warning( + "Exception when calling SMSApi->sms_send_post: %s\n" + % e) diff --git a/clicksend_sms_odoo/wizard/send_sms_views.xml b/clicksend_sms_odoo/wizard/send_sms_views.xml new file mode 100644 index 000000000..7f185940d --- /dev/null +++ b/clicksend_sms_odoo/wizard/send_sms_views.xml @@ -0,0 +1,114 @@ + + + + + send.sms.view.form + send.sms + +
+ + + + + + + + + + + +
+
+
+
+
+ + + Send + send.sms + form + + new + + + + send.sms.view.form + send.sms + +
+ + + + + + + + + + + +
+
+
+
+
+ + + Send + send.sms + form + + new + + + + send.sms.view.form + send.sms + +
+ + + + + + + + + + + +
+
+
+
+
+ + + Send + send.sms + form + + new + + + + + + + +