I'm trying to send a SMS message via python in an automated action. I couldn't find any specific documentation regarding this but I did come across a couple of similar posts.
I've tried this:
sms_pool = env['sms.template']
sms_template = sms_pool.search(['&', ('model_id', '=', 'sale.subscription'), ('id', '=', 9)])
sms_template.send_sms(subscription.id)
Which is similar to how I send email templates. But I receive "send_sms" is not a function. If this technique works, what function should I use (instead of 'send_sms') to send the message?
I've also tried:
#sms_obj = env['sms.composer'].create({
# 'numbers': sms_phone,
# 'body': sms_body
#})
#sms_obj.action_send_sms()
but I receive an invalid recipient message. I've tried to format the phone number in various ways without success.
Can someone please point me in the right direction regarding what I'm missing to make this happen.