Subir
Subir

Reputation: 3

Is it possible to send SMS through automated action in Odoo V13 and above?

I am using Odoo Enterprise V13. I am trying to create an automated action to send SMS to the Sales Manager with specific mobile phone number as soon as a lead is created. I found something similar here and tried this as python code in server action to simulate.

env['sms.composer'].action_send_sms({'numbers':'1386xxxxxxx', 'body':'New lead has been created in Odoo'})

Upvotes: 0

Views: 467

Answers (1)

Paxmees
Paxmees

Reputation: 1590

I can't test it. But first, create the sms.composer object and then send it. Currently, you are calling a function that takes no arguments.

my_sms = env['sms.composer'].create({'numbers':'1386xxxxxxx', 'body':'New lead has been created in Odoo'})
my_sms.action_send_sms()

https://github.com/odoo/odoo/blob/65e5b31f346030b6efcecf0de0ae448aeff7aae2/addons/sms/wizard/sms_composer.py#L148

Upvotes: 1

Related Questions