@ -0,0 +1,50 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Twilio SMS Gateway |
|||
================== |
|||
Facilitating individual and group SMS communication through the Twilio gateway. |
|||
|
|||
Configuration |
|||
============= |
|||
* Install Twilio python package (pip3 install twilio). |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL v3). |
|||
https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developer:(V16) Unnimaya C O, 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 `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,59 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Twilio SMS Gateway', |
|||
'version': '16.0.1.0.0', |
|||
'category': 'Productivity', |
|||
'summary': """Facilitating individual and group SMS communication through |
|||
the Twilio gateway.""", |
|||
'description': """This module empowers seamless SMS communication via |
|||
Twilio, enabling users to send messages directly from sale orders and |
|||
purchase orders. Users can conveniently create and utilize message |
|||
templates for efficient communication. Additionally, the module |
|||
facilitates group messaging, allowing users to send SMS to multiple |
|||
recipients simultaneously.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['sale_management', 'purchase'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'data/ir_cron_data.xml', |
|||
'wizard/sms_builder_views.xml', |
|||
'views/purchase_order_views.xml', |
|||
'views/res_partner_views.xml', |
|||
'views/sale_order_views.xml', |
|||
'views/twilio_account_views.xml', |
|||
'views/twilio_sms_group_views.xml', |
|||
'views/twilio_sms_template_views.xml', |
|||
'views/twilio_sms_views.xml' |
|||
], |
|||
'external_dependencies': { |
|||
'python': ['twilio'] |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': True, |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!--Scheduled action for sending SMS --> |
|||
<data noupdate="1"> |
|||
<record id="ir_cron_send_sms" model="ir.cron"> |
|||
<field name="name">Send SMS</field> |
|||
<field name="model_id" ref="model_twilio_sms"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model.send_sms_on_time()</field> |
|||
<field name="interval_number">1</field> |
|||
<field name="interval_type">minutes</field> |
|||
<field name="numbercall">-1</field> |
|||
<field name="doall" eval="False"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,7 @@ |
|||
## Module <odoo_twilio_sms> |
|||
|
|||
#### 26.10.2023 |
|||
#### Version 16.0.1.0.0 |
|||
##### ADD |
|||
|
|||
- Initial Commit for Twilio SMS Gateway |
@ -0,0 +1,28 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import purchase_order |
|||
from . import res_partner |
|||
from . import sale_order |
|||
from . import twilio_account |
|||
from . import twilio_sms |
|||
from . import twilio_sms_group |
|||
from . import twilio_sms_template |
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import models, _ |
|||
|
|||
|
|||
class PurchaseOrder(models.Model): |
|||
"""Inheriting purchase order for including Twilio functions""" |
|||
_inherit = 'purchase.order' |
|||
|
|||
def action_purchase_twilio_sms(self): |
|||
"""Action for opening SMS wizard view""" |
|||
action = { |
|||
'type': 'ir.actions.act_window', |
|||
'name': _('Message Content'), |
|||
'res_model': 'sms.builder', |
|||
'view_mode': 'form', |
|||
'target': 'new', |
|||
'context': {'default_partner_id': self.partner_id.id}, |
|||
'views': [[False, 'form']] |
|||
} |
|||
return action |
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models, _ |
|||
|
|||
|
|||
class ResPartner(models.Model): |
|||
"""Inheriting res partner for including Twilio fields and functions""" |
|||
_inherit = 'res.partner' |
|||
|
|||
twilio_contact_id = fields.Many2one('twilio.sms.group', |
|||
string='Twilio ID', |
|||
help='Twilio Connection ID') |
|||
|
|||
def action_partner_twilio_sms(self): |
|||
"""Action for opening the SMS wizard view""" |
|||
action = { |
|||
'type': 'ir.actions.act_window', |
|||
'name': _('Message Content'), |
|||
'res_model': 'sms.builder', |
|||
'view_mode': 'form', |
|||
'target': 'new', |
|||
'context': {'default_partner_id': self.id}, |
|||
'views': [[False, 'form']] |
|||
} |
|||
return action |
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import models, _ |
|||
|
|||
|
|||
class SaleOrder(models.Model): |
|||
"""Inheriting sale order for adding Twilio functions""" |
|||
_inherit = 'sale.order' |
|||
|
|||
def action_twilio_sms(self): |
|||
"""Action for opening Twilio SMS wizard view""" |
|||
action = { |
|||
'type': 'ir.actions.act_window', |
|||
'name': _('Message Content'), |
|||
'res_model': 'sms.builder', |
|||
'view_mode': 'form', |
|||
'target': 'new', |
|||
'context': {'default_partner_id': self.partner_id.id}, |
|||
'views': [[False, 'form']] |
|||
} |
|||
return action |
@ -0,0 +1,87 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models, _ |
|||
from twilio.rest import Client |
|||
from twilio.base.exceptions import TwilioException |
|||
|
|||
|
|||
class TwilioAccount(models.Model): |
|||
"""Create Twilio account to set the details of Twilio account, |
|||
can set the number and auth token""" |
|||
_name = 'twilio.account' |
|||
_description = 'Twilio Account' |
|||
|
|||
name = fields.Char(string='Name', required=True, help='Name for Twilio ' |
|||
'account') |
|||
account_sid = fields.Char(string='Account SID', required=True, |
|||
help='Account SID for connecting with Twilio') |
|||
auth_token = fields.Char(string='Auth Token', required=True, |
|||
help='Auth Token for connecting with Twilio') |
|||
from_number = fields.Char(string='Your Twilio Phone Number', required=True, |
|||
help='Twilio account number') |
|||
to_number = fields.Char(string='To', required=True, |
|||
help='Recipient number with country code for ' |
|||
'testing the connection(It should be ' |
|||
'added to Verified Caller IDs in Twilio).') |
|||
body = fields.Text(string='Body', required=True, |
|||
help='Body for test message', |
|||
default='This Message is for testing Twilio Connection') |
|||
state = fields.Selection([ |
|||
('new', 'New'), |
|||
('confirm', 'Connected'), |
|||
], required=True, default='new', string='State', help='State of Twilio ' |
|||
'account') |
|||
|
|||
def action_test_connection(self): |
|||
"""Send test sms for checking the connection""" |
|||
try: |
|||
message = Client(self.account_sid, self.auth_token).messages.create( |
|||
body=self.body, |
|||
from_=self.from_number, |
|||
to=self.to_number |
|||
) |
|||
if message.sid: |
|||
self.write({'state': 'confirm'}) |
|||
message_data = _("Connection Successful!") |
|||
message_type = 'success' |
|||
else: |
|||
message_data = _("Connection Not Successful!") |
|||
message_type = 'warning' |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': message_data, |
|||
'type': message_type, |
|||
'sticky': True, |
|||
} |
|||
} |
|||
except TwilioException: |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': _("Connection Not Successful!"), |
|||
'type': 'warning', |
|||
'sticky': True, |
|||
} |
|||
} |
@ -0,0 +1,115 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models, _ |
|||
from twilio.rest import Client |
|||
from twilio.base.exceptions import TwilioException |
|||
|
|||
|
|||
class TwilioSms(models.Model): |
|||
"""Can send sms, select the receiver and template or content, |
|||
then can send the sms""" |
|||
_name = 'twilio.sms' |
|||
_description = 'Twilio SMS' |
|||
|
|||
name = fields.Char(string='Name', help='Name of Twilio SMS', required=True) |
|||
partner_id = fields.Many2one('twilio.sms.group', |
|||
string='Receiving Group', |
|||
help='Select the receiving groups', |
|||
required=True) |
|||
template_body_id = fields.Many2one('twilio.sms.template', |
|||
string='SMS Template', |
|||
help='Select the message template') |
|||
content = fields.Text(string='Content', help='SMS Content', required=True, |
|||
related='template_body_id.content', readonly=False) |
|||
scheduled_date = fields.Date(string='Scheduled Date', help='Scheduled ' |
|||
'Date for ' |
|||
'sending SMS', |
|||
default=fields.Date.today) |
|||
state = fields.Selection([ |
|||
('draft', 'Draft'), |
|||
('confirm', 'Confirm'), |
|||
('sent', 'Sent'), |
|||
], default='draft', string='State', help='State of SMS') |
|||
account_id = fields.Many2one('twilio.account', |
|||
string='Twilio Account', help='Choose the ' |
|||
'Twilio ' |
|||
'account', |
|||
required=True) |
|||
|
|||
def action_confirm_sms(self): |
|||
"""Send SMS when click the action button""" |
|||
for val in self: |
|||
val.state = 'confirm' |
|||
if val.scheduled_date == fields.Date.today(): |
|||
self.send_sms(val) |
|||
|
|||
def send_sms_on_time(self): |
|||
"""Send SMS when schedule the time""" |
|||
for val in self.env['twilio.sms'].search([]): |
|||
if (val.state == 'confirm' and val.scheduled_date == |
|||
fields.date.today()): |
|||
self.send_sms(val) |
|||
|
|||
@api.model |
|||
def send_sms(self, val): |
|||
"""Send SMS to all users""" |
|||
count = len(val.partner_id.contact_ids) |
|||
for partner in val.partner_id.contact_ids: |
|||
try: |
|||
client = Client(val.account_id.account_sid, |
|||
val.account_id.auth_token) |
|||
message = client.messages.create( |
|||
body=val.content, |
|||
from_=val.account_id.from_number, |
|||
to=partner.phone |
|||
) |
|||
if message.sid: |
|||
count = count - 1 |
|||
if not count: |
|||
val.state = 'sent' |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': 'Message Sent Successfully', |
|||
'type': 'success', |
|||
'sticky': False, |
|||
'next': { |
|||
'type': 'ir.actions.act_window_close' |
|||
}, |
|||
} |
|||
} |
|||
except TwilioException: |
|||
message_data = _("Message Not Sent!") |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': message_data, |
|||
'type': 'warning', |
|||
'sticky': False, |
|||
'next': { |
|||
'type': 'ir.actions.act_window_close' |
|||
}, |
|||
} |
|||
} |
|||
pass |
@ -0,0 +1,34 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class TwilioSmsGroup(models.Model): |
|||
"""SMS group for sending SMS to multiple person at once""" |
|||
_name = 'twilio.sms.group' |
|||
_description = 'Twilio SmS Group' |
|||
|
|||
name = fields.Char(string='Name', help='Name of the group', required=True) |
|||
contact_ids = fields.One2many('res.partner', |
|||
'twilio_contact_id', |
|||
string='Partner Group', help='Members of ' |
|||
'the group') |
@ -0,0 +1,31 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class TwilioSmsTemplate(models.Model): |
|||
"""Model for holding SMS templates""" |
|||
_name = 'twilio.sms.template' |
|||
_description = 'Twilio SmS Template' |
|||
|
|||
name = fields.Char(string='Name', help='Name of Template', required=True) |
|||
content = fields.Text(string='Content', help='Content of the Template') |
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 344 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,726 @@ |
|||
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div class="d-flex align-items-center justify-content-between" |
|||
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
|||
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" |
|||
style="width: 42px; height: 42px;"/> |
|||
<div> |
|||
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Community |
|||
</div> |
|||
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Enterprise |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF TITLE BAR --> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12"> |
|||
<!-- APP HERO --> |
|||
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
|||
Twilio SMS Gateway</h1> |
|||
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> |
|||
Facilitating Individual and Group SMS Communication Through |
|||
the Twilio Gateway. |
|||
</p> |
|||
<!-- END OF APP HERO --> |
|||
<img src="assets/screenshots/hero.gif" |
|||
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- NAVIGATION SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/compass.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Explore This |
|||
Module</h2> |
|||
</div> |
|||
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#overview"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn |
|||
more about this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#features"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
features of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#screenshots"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
screenshots for this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<!-- END OF NAVIGATION SECTION --> |
|||
<!-- OVERVIEW SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pie-chart.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Overview |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
This module empowers seamless SMS communication via Twilio, enabling |
|||
users to send messages directly from sale orders and purchase orders. |
|||
Users can conveniently create and utilize |
|||
message templates for efficient communication. Additionally, the module |
|||
facilitates group messaging, allowing users to send SMS to multiple |
|||
recipients simultaneously. |
|||
</div> |
|||
</div> |
|||
<!-- END OF OVERVIEW SECTION --> |
|||
<!-- FEATURES SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/features.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Features |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Send SMS from Sale Order and Purchase Order</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Craft reusable message templates for the efficient distribution of consistent content across various situations.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Establish user groups and send messages to multiple recipients simultaneously.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Schedule messages for future delivery.</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF FEATURES SECTION --> |
|||
<!-- SCREENSHOTS SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="screenshots"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pictures.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Screenshots |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Install Twilio |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot1.png" |
|||
class="img-thumbnail"/> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Login to your <a href="https://www.twilio.com/">Twilio</a> |
|||
Account. |
|||
</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
You can see the Account SID, Auth Token and My Twilio phone |
|||
number here. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot2.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Navigate to Phone Numbers -> Manage-> Verified Caller IDs and |
|||
click Add a new Caller ID button. |
|||
</h3> |
|||
<img src="assets/screenshots/verify.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Add the details and Verify number using Call or SMS. |
|||
</h3> |
|||
<p |
|||
style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
It is only possible to send SMS to Twilio verified numbers.</p> |
|||
<img src="assets/screenshots/add_number.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Navigate to Twilio Account menu under Configuration in Twilio. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot3.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Add credentials to establish the connection with Twilio. The field 'To' should be a Twilio verified number with country code. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot4.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Navigate to SMS Template menu under Configuration in Twilio. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot5.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Create SMS Template |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot6.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Navigate to Groups menu under Configuration in Twilio. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot7.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Create new group and add members. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot8.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Navigate to SMS menu and create new SMS. Then click SEND button. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot9.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Twilio SMS from Sale Order. |
|||
</h3> |
|||
<p |
|||
style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Create a Quotation and click SEND SMS VIA TWILIO button |
|||
to send the SMS from Quotation. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot10.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Add the details and click SEND button. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot11.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Twilio SMS from Purchase Order. |
|||
</h3> |
|||
<p |
|||
style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Create a Purchase Order and click SEND SMS VIA TWILIO |
|||
button |
|||
to send the SMS from Purchase Order. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot12.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Add the details and click SEND button. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot13.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Twilio SMS from Partner's form view. |
|||
</h3> |
|||
<p |
|||
style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Navigate to Send Twilio SMS under Action. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot14.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Add the details and click SEND button. |
|||
</h3> |
|||
<img src="assets/screenshots/Screenshot15.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SCREENSHOTS SECTION --> |
|||
<!-- RELATED PRODUCTS --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/categories.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Related |
|||
Products |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner" style="padding: 30px;"> |
|||
<div class="carousel-item" style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/project_dashboard_odoo/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l1.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/advanced_dynamic_dashboard/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l2.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/statement_report/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l3.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item active" |
|||
style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/agriculture_management_odoo/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l4.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/product_image_suggestion/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l5.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/woo_commerce/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l6.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Left and right controls --> |
|||
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
|||
style="width:35px; color:#000"> <span |
|||
class="carousel-control-prev-icon"><i |
|||
class="fa fa-chevron-left" |
|||
style="font-size:24px"></i></span> |
|||
</a> <a class="carousel-control-next" href="#demo1" |
|||
data-slide="next" style="width:35px; color:#000"> |
|||
<span class="carousel-control-next-icon"><i |
|||
class="fa fa-chevron-right" |
|||
style="font-size:24px"></i></span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF RELATED PRODUCTS --> |
|||
<!-- OUR SERVICES --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/star.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our Services |
|||
</h2> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/cogs.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Customization</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/wrench.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/lifebuoy.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Support</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/user.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Hire |
|||
Odoo |
|||
Developer</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/puzzle.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Integration</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/update.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Migration</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/consultation.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Consultancy</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/training.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/license.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Licensing Consultancy</h6> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--END OF OUR SERVICES --> |
|||
<!-- OUR INDUSTRIES --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/corporate.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our |
|||
Industries |
|||
</h2> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/trading-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Trading |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easily procure |
|||
and |
|||
sell your products</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/pos-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
POS |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easy |
|||
configuration |
|||
and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/education-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Education |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
A platform for |
|||
educational management</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/manufacturing-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Manufacturing |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Plan, track and |
|||
schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/ecom-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
E-commerce & Website |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Mobile |
|||
friendly, |
|||
awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/service-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Service Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Keep track of |
|||
services and invoice</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/restaurant-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Restaurant |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Run your bar or |
|||
restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/hotel-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Hotel Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
An |
|||
all-inclusive |
|||
hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF OUR INDUSTRIES --> |
|||
<!-- SUPPORT --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/customer-support.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Support |
|||
</h2> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/support.png" height="48" width="48" |
|||
style="width: 42px; height: 42px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>Need Help?</h4> |
|||
<p style="line-height: 100%;">Got questions or need help? |
|||
Get in touch.</p> |
|||
<a href="mailto:odoo@cybrosys.com"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
odoo@cybrosys.com</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/whatsapp.png" height="52" width="52" |
|||
style="width: 52px; height: 52px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>WhatsApp</h4> |
|||
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
|||
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
+91 86068 |
|||
27707</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
|||
<img src="assets/misc/logo.png" width="144" height="31" |
|||
style="width:144px; height: 31px; margin-top: 40px;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUPPORT --> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Inherit purchase order form view for adding Twilio SMS button --> |
|||
<record id="purchase_order_form" model="ir.ui.view"> |
|||
<field name="name">purchase.order.view.form.inherit.odoo.twilio.sms</field> |
|||
<field name="model">purchase.order</field> |
|||
<field name="inherit_id" ref="purchase.purchase_order_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='action_rfq_send']" position="after"> |
|||
<button name="action_purchase_twilio_sms" type="object" |
|||
string="Send SMS Via Twilio"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Form view to send sms from res.partner --> |
|||
<record id="action_res_partner_view_form" model="ir.actions.act_window"> |
|||
<field name="name">Send Twilio SMS</field> |
|||
<field name="res_model">sms.builder</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="context">{ |
|||
'default_partner_id': active_id, |
|||
}</field> |
|||
<field name="binding_model_id" ref="base.model_res_partner"/> |
|||
<field name="binding_view_types">form</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!--Inherit sale order form view to add Twilio sms button--> |
|||
<record id="view_order_form" model="ir.ui.view"> |
|||
<field name="name">sale.order.view.form.inherit.odoo.twilio.sms</field> |
|||
<field name="model">sale.order</field> |
|||
<field name="inherit_id" ref="sale.view_order_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='action_quotation_send']" |
|||
position="after"> |
|||
<button name="action_twilio_sms" type="object" |
|||
string="Send SMS Via Twilio"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,78 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Form View of twilio.account --> |
|||
<record id="twilio_account_view_form" model="ir.ui.view"> |
|||
<field name="name">twilio.account.view.form</field> |
|||
<field name="model">twilio.account</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<header> |
|||
<button id="test_connection" name="action_test_connection" |
|||
string="TEST CONNECTION" class="btn-primary" |
|||
type="object" |
|||
attrs="{'invisible': [('state','!=','new')]}"/> |
|||
<field name="state" widget="statusbar"/> |
|||
</header> |
|||
<sheet> |
|||
<div class="oe_title"> |
|||
<label for="name" string="Name"/> |
|||
<h1> |
|||
<div class="d-flex"> |
|||
<field class="text-break" name="name"/> |
|||
</div> |
|||
</h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="account_sid" password="True"/> |
|||
<field name="auth_token" password="True"/> |
|||
</group> |
|||
<group> |
|||
<field name="from_number"/> |
|||
<field name="to_number"/> |
|||
<field name="body"/> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<!-- Tree View of twilio.account --> |
|||
<record id="twilio_account_view_tree" model="ir.ui.view"> |
|||
<field name="name">twilio.account.view.tree</field> |
|||
<field name="model">twilio.account</field> |
|||
<field name="arch" type="xml"> |
|||
<tree name="twilio_tree"> |
|||
<field name="name"/> |
|||
<field name="account_sid"/> |
|||
<field name="auth_token"/> |
|||
<field name="from_number"/> |
|||
<field name="state" widget="badge" |
|||
decoration-info="state == 'draft'" |
|||
decoration-success="state == 'confirm'"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<!-- Action for twilio --> |
|||
<record id="twilio_account_action" model="ir.actions.act_window"> |
|||
<field name="name">Twilio Account</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">twilio.account</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Generate Account Details |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio menu --> |
|||
<menuitem id="twilio_menu_root" name="Twilio" sequence="2" |
|||
web_icon="odoo_twilio_sms,static/description/icon.png"/> |
|||
<!-- Configuration menu --> |
|||
<menuitem id="twilio_configuration_menu" name="Configuration" |
|||
parent="twilio_menu_root" sequence="2"/> |
|||
<!-- Twilio Account menu --> |
|||
<menuitem id="twilio_account_menu" name="Twilio Account" |
|||
parent="twilio_configuration_menu" action="twilio_account_action" |
|||
sequence="4"/> |
|||
</odoo> |
@ -0,0 +1,56 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Form View of twilio sms group --> |
|||
<record id="twilio_sms_group_view_form" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.group.view.form</field> |
|||
<field name="model">twilio.sms.group</field> |
|||
<field name="arch" type="xml"> |
|||
<form name="Contacts"> |
|||
<sheet> |
|||
<div class="oe_title"> |
|||
<label for="name" string="Name"/> |
|||
<h1> |
|||
<div class="d-flex"> |
|||
<field class="text-break" name="name"/> |
|||
</div> |
|||
</h1> |
|||
</div> |
|||
<field name="contact_ids" widget="many2many" mode="tree"> |
|||
<tree editable="bottom"> |
|||
<field name="name"/> |
|||
<field name="phone"/> |
|||
<field name="twilio_contact_id" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Group tree view --> |
|||
<record id="twilio_sms_group_view_tree" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.group.view.tree</field> |
|||
<field name="model">twilio.sms.group</field> |
|||
<field name="arch" type="xml"> |
|||
<tree name="twilio_contact_tree"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Group menu action --> |
|||
<record id="twilio_sms_group_action" model="ir.actions.act_window"> |
|||
<field name="name">Groups</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">twilio.sms.group</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Generate Twilio SMS Group |
|||
</p> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Group menu --> |
|||
<menuitem id="twilio_sms_group_menu" name="Groups" |
|||
parent="twilio_configuration_menu" |
|||
action="twilio_sms_group_action" |
|||
sequence="7"/> |
|||
</odoo> |
@ -0,0 +1,50 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Twilio SMS Template form view --> |
|||
<record id="twilio_sms_template_view_form" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.template.view.form</field> |
|||
<field name="model">twilio.sms.template</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<div class="oe_title"> |
|||
<label for="name" string="Name"/> |
|||
<h1> |
|||
<div class="d-flex"> |
|||
<field class="text-break" name="name"/> |
|||
</div> |
|||
</h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="content"/> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Template tree view --> |
|||
<record id="twilio_sms_template_view_tree" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.template.view.tree</field> |
|||
<field name="model">twilio.sms.template</field> |
|||
<field name="arch" type="xml"> |
|||
<tree name="twilio_template_tree"> |
|||
<field name="name"/> |
|||
<field name="content"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Template Action --> |
|||
<record id="twilio_sms_template_action" model="ir.actions.act_window"> |
|||
<field name="name">SMS Template</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">twilio.sms.template</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
<!-- Twilio SMS Template Menu --> |
|||
<menuitem id="twilio_sms_template_menu" name="SMS Template" |
|||
parent="twilio_configuration_menu" |
|||
action="twilio_sms_template_action" |
|||
sequence="5"/> |
|||
</odoo> |
@ -0,0 +1,63 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Twilio SMS Form View--> |
|||
<record id="twilio_sms_view_form" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.view.form</field> |
|||
<field name="model">twilio.sms</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<header> |
|||
<button id="action_confirm_sms" name="action_confirm_sms" |
|||
string="Send" class="btn-primary" |
|||
type="object" states="draft"/> |
|||
<field name="state" widget="statusbar"/> |
|||
</header> |
|||
<sheet> |
|||
<div class="oe_title"> |
|||
<label for="name" string="Name"/> |
|||
<h1> |
|||
<div class="d-flex"> |
|||
<field class="text-break" name="name"/> |
|||
</div> |
|||
</h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="account_id"/> |
|||
<field name="partner_id"/> |
|||
<field name="template_body_id"/> |
|||
</group> |
|||
<group> |
|||
<field name="content"/> |
|||
<field name="scheduled_date"/> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Tree view --> |
|||
<record id="twilio_sms_view_tree" model="ir.ui.view"> |
|||
<field name="name">twilio.sms.view.tree</field> |
|||
<field name="model">twilio.sms</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name"/> |
|||
<field name="partner_id"/> |
|||
<field name="scheduled_date"/> |
|||
<field name="account_id"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<!-- Twilio SMS Action --> |
|||
<record id="twilio_sms_action" model="ir.actions.act_window"> |
|||
<field name="name">Twilio SMS</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">twilio.sms</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
<!-- Twilio SMS Menu --> |
|||
<menuitem id="twilio_sms_menu" name="SMS" parent="twilio_menu_root" |
|||
action="twilio_sms_action" |
|||
sequence="1"/> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import sms_builder |
@ -0,0 +1,91 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Unnimaya C O (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models, _ |
|||
from twilio.rest import Client |
|||
from twilio.base.exceptions import TwilioException |
|||
|
|||
|
|||
class SmsBuilder(models.TransientModel): |
|||
"""Class to handle all the functions required in send sms """ |
|||
_name = 'sms.builder' |
|||
_description = 'SMS Builder' |
|||
|
|||
partner_id = fields.Many2one('res.partner', string='Recipient', |
|||
help='Receiving User') |
|||
receiving_number = fields.Char(string='Receiving Number', |
|||
help='Receiving Number', |
|||
required=True, readonly=False, |
|||
related='partner_id.mobile') |
|||
template_id = fields.Many2one('twilio.sms.template', |
|||
string='Select Template', |
|||
help='Message Template') |
|||
text_message = fields.Text(string='Message', help='Message Content', |
|||
required=True, related='template_id.content', |
|||
readonly=False) |
|||
account_id = fields.Many2one('twilio.account', |
|||
string='Twilio Account', help='Choose the ' |
|||
'Twilio ' |
|||
'account', |
|||
required=True) |
|||
|
|||
def action_confirm_sms(self): |
|||
"""Send sms to the corresponding user by using the twilio connection""" |
|||
try: |
|||
client = Client(self.account_id.account_sid, |
|||
self.account_id.auth_token) |
|||
message = client.messages.create( |
|||
body=self.text_message, |
|||
from_=self.account_id.from_number, |
|||
to=self.receiving_number |
|||
) |
|||
if message.sid: |
|||
message_data = _("Message Sent!") |
|||
type_data = 'success' |
|||
else: |
|||
message_data = _("Message Not Sent!") |
|||
type_data = 'warning' |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': message_data, |
|||
'type': type_data, |
|||
'sticky': False, |
|||
'next': { |
|||
'type': 'ir.actions.act_window_close' |
|||
}, |
|||
} |
|||
} |
|||
except TwilioException: |
|||
message_data = _("Message Not Sent!") |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'message': message_data, |
|||
'type': 'warning', |
|||
'sticky': False, |
|||
'next': { |
|||
'type': 'ir.actions.act_window_close' |
|||
}, |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Sms builder form view --> |
|||
<record id="sms_builder_view_form" model="ir.ui.view"> |
|||
<field name="name">sms.builder.view.form</field> |
|||
<field name="model">sms.builder</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form name="Message Content"> |
|||
<group> |
|||
<group> |
|||
<field name="account_id"/> |
|||
<field name="partner_id"/> |
|||
<field name="template_id"/> |
|||
</group> |
|||
<group> |
|||
<field name="receiving_number"/> |
|||
<field name="text_message" widget="sms_widget"/> |
|||
</group> |
|||
</group> |
|||
<footer> |
|||
<button name="action_confirm_sms" type="object" |
|||
string="Send" class="btn-primary" |
|||
data-hotkey="q"/> |
|||
<button special="cancel" data-hotkey="z" string="Cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |