summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sj_tele.py
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-10 14:49:13 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-10 14:49:13 +0700
commit10ddd8835a98bbfe58abedf6a405929dfbbb76d0 (patch)
treea61cea71a2e732a70d20fcbcc271d79e69ded02c /indoteknik_custom/models/sj_tele.py
parentb0d0e26965ab1ba7aa0c5a607cc0a12a67546dfc (diff)
parente4b191155bf44bfcd58d6ae1b95d4a112bd43547 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
Diffstat (limited to 'indoteknik_custom/models/sj_tele.py')
-rw-r--r--indoteknik_custom/models/sj_tele.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sj_tele.py b/indoteknik_custom/models/sj_tele.py
index 5ea08340..3ef4b877 100644
--- a/indoteknik_custom/models/sj_tele.py
+++ b/indoteknik_custom/models/sj_tele.py
@@ -66,10 +66,12 @@ class SjTele(models.Model):
header = "Berikut merupakan nomor BU/OUT yang belum ada di Logbook SJ report:\n"
BUB = 20 # jumlah baris per bubble
+ total = (len(lines) + BUB - 1) // BUB # total bubble
for i in range(0, len(lines), BUB):
body = "\n".join(lines[i:i + BUB])
- text = header + body
+ bagian = (i // BUB) + 1
+ text = f"{header}Lampiran ke {bagian}/{total}\n{body}"
try:
r = requests.post(
api_base + "/sendMessage",