Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
691 Lượt xem

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à !



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 25
549
3
thg 3 25
1193
2
thg 2 25
3450
1
thg 2 25
1115
1
thg 5 25
813