summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/website_telegram.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/indoteknik_custom/models/website_telegram.py b/indoteknik_custom/models/website_telegram.py
index 74955b7b..290fd1f9 100644
--- a/indoteknik_custom/models/website_telegram.py
+++ b/indoteknik_custom/models/website_telegram.py
@@ -21,7 +21,6 @@ class WebsiteTelegram(models.Model):
tittle = fields.Char("Channel Title")
invite_link = fields.Char("Channel invite link")
username = fields.Char("Channel Name")
- username_to_add = fields.Char("username to add on channel", compute='_compute_username_to_add')
user_id = fields.Many2many('res.partner', string='User Member', store=True)
id_data = fields.Char("Channel ID")
about = fields.Char("Channel Description")
@@ -31,15 +30,6 @@ class WebsiteTelegram(models.Model):
# session_string = 'MIIBCgKCAQEAyMEdY1aR+sCR3ZSJrtztKTKqigvO/vBfqACJLZtS7QMgCGXJ6XIRyy7mx66W0/sOFa7/1mAZtEoIokDP3ShoqF4fVNb6XeqgQfaUHd8wJpDWHcR2OFwvplUUI1PLTktZ9uW2WE23b+ixNwJjJGwBDJPQEQFBE+vfmH0JP503wr5INS1poWg/j25sIWeYPHYeOrFp/eXaqhISP6G+q2IeTaWTXpwZj4LzXq5YOpk4bYEQ6mvRq7D1aHWfYmlEGepfaYR8Q0YqvvhYtMte3ITnuSJs171+GDqpdKcSwHnd6FudwGO4pcCOj4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB'
- @api.depends('user_id')
- def _compute_username_to_add(self):
- for record in self:
- usernames = []
- for partner in record.user_id:
- if partner.telegram_id: # Pastikan mobile tidak None
- usernames.append(partner.mobile)
- # Gabungkan semua nomor menjadi satu string, dipisahkan koma
- record.username_to_add = ', '.join(usernames)
def create_channel(self, message):
asyncio.run(self._async_create_channel(message))