summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/wati.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/wati.py b/indoteknik_custom/models/wati.py
index 57ba9a4a..0a4da9e1 100644
--- a/indoteknik_custom/models/wati.py
+++ b/indoteknik_custom/models/wati.py
@@ -18,6 +18,7 @@ class WatiNotification(models.Model):
watis = self.env['wati.notification'].search(query, order='id')
for wati in watis:
+ _logger.info('Convert Lead ID %s' % wati.id)
ticket_id = json.loads(wati.json_raw)['ticketId']
text = json.loads(wati.json_raw)['text']
@@ -27,13 +28,13 @@ class WatiNotification(models.Model):
if current_lead:
# must append internal notes as a reply here
- current_lead.description = current_lead.description + "|" +text
+ current_lead.description = current_lead.description + "|" +str(text)
wati.is_lead = True
else:
# create new leads
contact_name = json.loads(wati.json_raw)['senderName']
phone = json.loads(wati.json_raw)['waId']
- name = 'Ada pesan dari WATI '+phone+' '+contact_name
+ name = 'Ada pesan dari WATI '+str(phone)+' '+str(contact_name)
self.env['crm.lead'].create([{
'name': name,