Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1249 Widoki

Using Settings > General Settings > Contacts > Manage SMS & Buy Credits


we have successfully registered our SMS account and have some free credits to evaluate the service (then we would purchase SMS credits package using IAP).

Using the Odoo Graphical Interface, we can successfully send a SMS to an Employee by clicking on the SMS icon​ near the Employee's mobile number.


However we need to send SMS using python in our custom Odoo module. We have installed the SMS Gateway Module (module technical name sms​), and added same in the manifest depends list.


'depends':['sms', ...],

Here is the python code to send an SMS

sms_values = {

    'body': "Have a nice day",

    'number': '+42',

}

sms = env['sms.sms'].create(sms_values)

sms._send()


Et voilà !



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 25
1197
3
mar 25
2144
2
lut 25
5176
1
lut 25
1919
1
maj 25
1344