2025-02-19 16:55:26 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00
2025-02-19 16:15:22 +03:00

Odoo base_telegram

Odoo Telegram API Menu: Settings / Technical / Parameters / Telegram API Connections

Add new connection

  • Open the chat with @BotFather
  • Enter the command /newbot to create a bot
  • Save received token (like: 1234567890:ABcdeFghKLMNopqrs_TUvWxyz)
  • Create a group where the created bot should post messages
  • Add the bot to the group
  • Grant the bot admin access in the group
  • Send a test message in the group, ensure that the bot can read it
  • Save Chat ID from test message

Telegram API new connection form

Send message to Telegram

env["base.telegram"].browse(1).send_message('Test')

Send message from project.task by template

self = env["base.telegram"].browse(1) obj = env['project.task'].browse(4) self.with_context(lang=env.user.lang if env.user.lang else 'ru_RU', tz=env.user.tz if env.user.tz else 'Europe/Moscow').send_template('base_telegram.message_new_task', obj)

Description
No description provided
Readme 203 KiB
Languages
Python 50.6%
HTML 49.4%