Overview
This module integrates odoo with Talksasa SMS Gateway. In addition to the usual odoo SMS flow, this module allows you to send SMS from the chatter of any document that has a partner_id field. You can type the message to send or use a predefined template.
How it works
Select 'Send via Talksasa' in the Send SMS setting.
Click on 'Configure TalkSasa Account' and enter your TalkSasa credentials. You can use the 'Send test SMS' feature to check if your credentials are correct
Create SMS templates for the models you want to integrate (optional). Use double curly braces to define variables e.g {{object.name}}.
You can now send SMS from anywhere in the system using either the 'Send SMS' button in the chatter, the 'Send SMS' icon of the phone widget or the SMS marketing app. Basically, all SMS messages will be channeled through TalkSasa regardless of how they were initiated.
For developers, there are two abstract methods available for further customization:
-
send_sms_with_template(self, template_id)- available on any model that has a 'partner_id' field. Takes 1 argument (SMSTemplate object). To be called on the respective model Recordset -
send_sms_notification(self, message)- available only on the 'res.partner' model. Takes 1 argument (the message to send - a string). To be called on a 'res.partner' Recordset