diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-31 09:44:40 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-31 09:44:40 +0700 |
| commit | 1d5e4ca1fa58bcd59954a08b694f273d4c563cdf (patch) | |
| tree | e95bfc88847e36a9b0306ff812e235c1b215f1d7 | |
| parent | 8d00df73e76162d624d2f32eefdd47ca68ca154c (diff) | |
<iman> update telegram
| -rw-r--r-- | indoteknik_custom/models/website_telegram.py | 10 |
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)) |
