Reputation: 3
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'})
action_send_sms() takes 1 positional argument but 2 were given
.Upvotes: 0
Views: 467
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()
Upvotes: 1