@ -0,0 +1,55 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
Twilio SMS Gateway |
||||
|
================== |
||||
|
Facilitating individual and group SMS communication through the Twilio gateway. |
||||
|
|
||||
|
Features |
||||
|
======== |
||||
|
* Create Reusable Message Templates for Consistent Content Distribution. |
||||
|
* Set Up User Groups for Simultaneous Message Sending. |
||||
|
* Schedule Messages. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* Create a account in Twilio, https://www.twilio.com. |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
Affero General Public License, v3.0 (AGPL v3). |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developers: (V16) Unnimaya C O |
||||
|
(V17) Farhana Jahan PT, |
||||
|
(V18) Gayathri V |
||||
|
Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from . import models |
||||
|
from . import wizard |
@ -0,0 +1,60 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
{ |
||||
|
'name': 'Twilio SMS Gateway', |
||||
|
'version': '18.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': [ |
||||
|
'data/ir_cron_data.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'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', |
||||
|
'wizard/sms_builder_views.xml' |
||||
|
], |
||||
|
'external_dependencies': { |
||||
|
'python': ['twilio'], |
||||
|
}, |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': True, |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
<?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="odoo_twilio_sms.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> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,6 @@ |
|||||
|
## Module <odoo_twilio_sms> |
||||
|
|
||||
|
#### 14.11.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial Commit for Twilio SMS Gateway |
@ -0,0 +1,28 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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,85 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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'), |
||||
|
], 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'}) |
||||
|
|
||||
|
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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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' |
||||
|
}, |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gayathri V (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <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: 716 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 415 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 118 KiB |