Changed gsm by mobile
Changed smssend by sms_send bzr revid: fbs-ef0900ead11d4fe86703d9ceb45f44f623b07053
This commit is contained in:
parent
3a85c88fb3
commit
6ecfc86fcb
|
@ -49,13 +49,13 @@ sms_send_fields = {
|
|||
|
||||
def _sms_send(self, cr, uid, data, context):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
res = service.execute(cr.dbname, uid, 'res.partner', 'read', data['ids'], ['gsm'])
|
||||
res = service.execute(cr.dbname, uid, 'res.partner', 'read', data['ids'], ['mobile'])
|
||||
|
||||
nbr = 0
|
||||
for r in res:
|
||||
to = r['gsm']
|
||||
to = r['mobile']
|
||||
if to:
|
||||
tools.smssend(data['form']['user'], data['form']['password'], data['form']['app_id'], unicode(data['form']['text'], 'utf-8').encode('latin1'), to)
|
||||
tools.sms_send(data['form']['user'], data['form']['password'], data['form']['app_id'], unicode(data['form']['text'], 'utf-8').encode('latin1'), to)
|
||||
nbr += 1
|
||||
return {'sms_sent': nbr}
|
||||
|
||||
|
|
Loading…
Reference in New Issue