diff --git a/clicksend_sms_odoo/README.rst b/clicksend_sms_odoo/README.rst new file mode 100644 index 000000000..85530203b --- /dev/null +++ b/clicksend_sms_odoo/README.rst @@ -0,0 +1,49 @@ +.. 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 + +ClickSend SMS Integration +========================= +* Odoo -Integration with ClickSend SMS Gateway + +Configuration +============= +- Need to add API Key and Username in Clicksend settings section in Res Config Settings + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: + (V15) Raveena V, + (V16) Anfas Faisal K + 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..61afc8b56 --- /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: Anfas Faisal K (odoo@cybrosys.info) +# +# 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..5ebc1c858 --- /dev/null +++ b/clicksend_sms_odoo/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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": "16.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", + "views/clicksend_sms_odoo_menus.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..49e94841a --- /dev/null +++ b/clicksend_sms_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 15.02.2024 +#### Version 16.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..50c880e1a --- /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: Anfas Faisal K (odoo@cybrosys.info) +# +# 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..5b50c7da6 --- /dev/null +++ b/clicksend_sms_odoo/models/res_config_settings.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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 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", + config_parameter='clicksend_sms_odoo.username') + api_key = fields.Char(string="API Key", + help="You will get the API key from ClickSend", + config_parameter='clicksend_sms_odoo.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..fd8c15779 --- /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: Anfas Faisal K (odoo@cybrosys.info) +# +# 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..ea72fb349 --- /dev/null +++ b/clicksend_sms_odoo/models/sms_history.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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): + """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") 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..c94bba9ff --- /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_user,access.send.sms.user,model_send_sms,base.group_user,1,1,1,1 +access_sms_group_user,access.sms.group.user,model_sms_group,base.group_user,1,1,1,1 +access_sms_history_user,access.sms.history.user,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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 index 000000000..e894393ef 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/3.jpg b/clicksend_sms_odoo/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..cbcc848e2 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/3.jpg 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 100755 index 000000000..eb3f8652f 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 100755 index 000000000..b2c688334 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..a3194264c Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/6.png differ diff --git a/clicksend_sms_odoo/static/description/assets/modules/banner.jpg b/clicksend_sms_odoo/static/description/assets/modules/banner.jpg new file mode 100755 index 000000000..bce945d1e Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/modules/banner.jpg differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/1.png b/clicksend_sms_odoo/static/description/assets/screenshots/1.png new file mode 100755 index 000000000..56b91ea6b Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/1.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/10.png b/clicksend_sms_odoo/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..8a75b62ea Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/10.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/2.png b/clicksend_sms_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..13226b7a6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/2.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/3.png b/clicksend_sms_odoo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..8e85457b6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/3.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/4.png b/clicksend_sms_odoo/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2783ec1eb Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/4.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/5.png b/clicksend_sms_odoo/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ba7b73ee7 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/5.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/6.png b/clicksend_sms_odoo/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..eec7fc808 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/6.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/7.png b/clicksend_sms_odoo/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..7ef00ea88 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/7.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/8.png b/clicksend_sms_odoo/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..c33de02e6 Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/8.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/9.png b/clicksend_sms_odoo/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..a2a398e8e Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/9.png differ diff --git a/clicksend_sms_odoo/static/description/assets/screenshots/v16-hero.gif b/clicksend_sms_odoo/static/description/assets/screenshots/v16-hero.gif new file mode 100644 index 000000000..2975fb7ef Binary files /dev/null and b/clicksend_sms_odoo/static/description/assets/screenshots/v16-hero.gif 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..2f451016c 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..0efd010e7 Binary files /dev/null and b/clicksend_sms_odoo/static/description/icon.png differ diff --git a/clicksend_sms_odoo/static/description/index.html b/clicksend_sms_odoo/static/description/index.html new file mode 100755 index 000000000..01229a2eb --- /dev/null +++ b/clicksend_sms_odoo/static/description/index.html @@ -0,0 +1,721 @@ +
+ +
+ +
+
+ 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. + +
+
+
+ This module uses an external python dependency + 'clicksend_client'.Before + installing the module install the python + package + first.The required python package can be installed using the + following command, +
+ pip install clicksend-client +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+ + Configure API Credentials + +
+
+ + Create Groups and Send SMS +
+ +
+ + Send SMS to a Partner + +
+
+ + Send SMS to Anyone + +
+
+
+
+ +
+
+

+ 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/clicksend_sms_odoo_menus.xml b/clicksend_sms_odoo/views/clicksend_sms_odoo_menus.xml new file mode 100644 index 000000000..bd9136f07 --- /dev/null +++ b/clicksend_sms_odoo/views/clicksend_sms_odoo_menus.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + 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..19eef876c --- /dev/null +++ b/clicksend_sms_odoo/views/res_config_settings_views.xml @@ -0,0 +1,59 @@ + + + + + + res.config.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..8a629f74a --- /dev/null +++ b/clicksend_sms_odoo/views/sms_group_views.xml @@ -0,0 +1,38 @@ + + + + + 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..6e1d5cdd1 --- /dev/null +++ b/clicksend_sms_odoo/views/sms_history_views.xml @@ -0,0 +1,53 @@ + + + + + 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..2706c2c2d --- /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: Anfas Faisal K (odoo@cybrosys.info) +# +# 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..4d53e56df --- /dev/null +++ b/clicksend_sms_odoo/wizard/send_sms.py @@ -0,0 +1,131 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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, ValidationError + +_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 SMS using ClickSend API. + This method retrieves ClickSend credentials from Odoo configuration + parameters, constructs SMS messages based on the recipient information, + and sends the SMS using the ClickSend API. It logs the SMS history + with details like recipient name, number, message, and delivery + status.""" + 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 = username + configuration.password = password + api_instance = clicksend_client.SMSApi( + clicksend_client.ApiClient(configuration)) + num_list = [] + name_list = [] + number = False + 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 + ) + else: + sms_messages = [SmsMessage( + source="php", + body=self.message, + to=num, + schedule=1436874701 + ) for num in num_list] + try: + if number: + api_response = api_instance.sms_send_post( + clicksend_client.SmsMessageCollection( + messages=[sms_message])) + else: + api_response = api_instance.sms_send_post( + clicksend_client.SmsMessageCollection( + messages=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 "") + if number: + self.env['sms.history'].create({ + 'name': name, + 'number': number, + 'state': state, + 'message': self.message + }) + else: + for num, name in zip(num_list, name_list): + 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) + raise ValidationError( + _("An error occurred while sending SMS. Please check your " + "Credentials and try again.")) 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 + + + + + + + +