summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-14 09:47:33 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-14 09:47:33 +0700
commite81db305d2727e7b95f1bb579315da1597a8185b (patch)
tree3a2a8f0e896c78dea674c923c29531088d46875e
parent1bf746c93dc5010e30490d0a5ed6a2a174726be0 (diff)
<iman> update send message to telegram
-rw-r--r--indoteknik_custom/models/ir_actions_report.py4
-rw-r--r--indoteknik_custom/models/website_telegram.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_custom/models/ir_actions_report.py b/indoteknik_custom/models/ir_actions_report.py
index d620f8a7..286c3a3d 100644
--- a/indoteknik_custom/models/ir_actions_report.py
+++ b/indoteknik_custom/models/ir_actions_report.py
@@ -15,13 +15,13 @@ class IrActionsReport(models.Model):
return
telegram_data = {
'tittle': sale_order.name,
- 'about': 'Permintaan retur ' + sale_order.name,
+ 'about': sale_order.name + ' Telah Di Print',
'id_data': sale_order.id,
'username': '@' + sale_order.name.replace('/', '')
}
channel_data = self.env['website.telegram'].search([('tittle', '=', sale_order.name)])
if channel_data:
- channel_data.send_to_telegram(sale_order.name + " Telah di print")
+ channel_data.send_to_telegram(sale_order.name + " Telah di print Oleh " + self.env.user.name)
for pick in self:
self._check_telegram(pick)
else:
diff --git a/indoteknik_custom/models/website_telegram.py b/indoteknik_custom/models/website_telegram.py
index 92707ea2..25dea14e 100644
--- a/indoteknik_custom/models/website_telegram.py
+++ b/indoteknik_custom/models/website_telegram.py
@@ -54,7 +54,9 @@ class WebsiteTelegram(models.Model):
users=[user_to_add.id],
))
message = 'https://erp.indoteknik.com/web#id=' + self.id_data + '&action=209&model=sale.order&view_type=form&cids=1&menu_id=101'
+ message2 = self.tittle + ' di print oleh ' + self.env.user.name
result_massage = await client(SendMessageRequest(channel, message))
+ result_massage2 = await client(SendMessageRequest(channel, message2))
# Send the poll to the channel using PeerChannel with the channel's ID
# result_polling = await client(SendMediaRequest(