# Telegram Notification Center (Odoo 19 Community)
Telegram Notification Center is a custom Odoo 19 Community module that sends business event alerts to a Telegram chat/group.
## Features
This module sends Telegram notifications for:
- Sale Order Confirmed
- Purchase Order Confirmed
- Invoice Paid
- Payment Due (Scheduled/Cron)
- Stock Low (Scheduled/Cron)
- CRM Lead Assigned
- Attendance Alerts (Scheduled/Cron)
Note: - Approval Required was removed from dependency flow to keep compatibility with Odoo 19 Community environments where approvals is unavailable.
## Module Path
- Module name: telegram_notification_center
## Requirements
- Odoo 19 Community
- Python package: requests
- Installed Odoo apps: - Sales (sale_management) - Purchase (purchase) - Accounting (account) - Inventory (stock) - CRM (crm) - Attendances (hr_attendance)
## Installation
Run Odoo with the parent addons path:
Then in Odoo:
- Apps -> Update Apps List
- Search Telegram Notification Center
- Install / Upgrade
## Telegram Setup
- Create bot using @BotFather
- Get bot token
- Add bot to target group/channel
- Get chat_id
Example to get chat by public username:
`bash curl "https://api.telegram.org/bot<YOUR_TOKEN>/getChat?chat_id=@your_group_username" `
Use returned id (example: -1003750784382) as Telegram Chat ID.
Test send message:
`bash curl "https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage?chat_id=<CHAT_ID>&text=Odoo%20test" `
## Odoo Configuration
Go to:
- Settings -> General Settings -> Telegram Notification Center
Fill:
- Enable Telegram Notifications
- Telegram Bot Token
- Telegram Chat ID
- Low Stock Threshold
Save.
## How to Test (English)
### 1) Purchase Order
- Create RFQ in Purchase
- Confirm PO
- Verify Telegram message
### 2) Sale Order
- Create quotation in Sales
- Confirm SO
- Verify Telegram message
If you get route/stock errors (No rule has been found to replenish...), test with a Service product or fix inventory routes.
### 3) Invoice Paid
- Create + post customer invoice
- Register payment
- Verify Invoice Paid Telegram message
### 4) Payment Due (Cron)
- Create posted invoice with due date <= today and unpaid
- Run scheduled action manually: - Settings -> Technical -> Automation -> Scheduled Actions - Telegram: Payment Due Alerts
- Verify Telegram message
### 5) Stock Low (Cron)
- Ensure product on-hand below threshold
- Run scheduled action: - Telegram: Low Stock Alerts
- Verify Telegram message
### 6) CRM Lead Assigned
- Create CRM lead
- Assign or change Salesperson
- Verify Telegram message
### 7) Attendance Alerts (Cron)
- Keep one employee without check-in for today
- Run scheduled action: - Telegram: Attendance Alerts
- Verify Telegram message
## Troubleshooting
- Error: Forbidden: bot is not a member of the supergroup chat - Add the bot back to the group. - Verify the bot token and chat ID.
- Error: No rule has been found to replenish ... - This is not a Telegram module issue. - Fix inventory route and product type configuration.
- No message sent: - Ensure Telegram notifications are enabled. - Verify token and chat ID values. - Check Odoo logs for Failed to send telegram notification.
## Security Notes
- Never expose bot token publicly.
- If token is exposed, rotate immediately via @BotFather (/revoke or regenerate token).
## Author
- thetzin
Please log in to comment on this module