Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

how can I get Oddo13-Forum to send mails on new posts

Subscribe

Get notified when there's activity on this post

This question has been flagged
mailForum
1 Reply
925 Views
Avatar
Flex Keller

How can I make it so that an email is sent to all users (employees) whenever a new forum post is created?

0
Avatar
Discard
Avatar
Gracious Joseph
Best Answer

To make Odoo 13 Forums send an email notification to all users (e.g., employees) whenever a new forum post is created, you need to configure automated actions or use Odoo’s built-in email notification system. Below are the steps to achieve this:

1. Enable Notifications for Forum Posts

By default, Odoo Forums allow followers of a forum or specific posts to receive notifications. To ensure all employees are notified:

  1. Add All Employees as Followers:
    • Navigate to the forum you want to track:
      • Go to Website > Forums and open the specific forum.
    • Click on the Follow button and manually add all employees as followers.

    Tip: Ensure all employees have access to their Odoo accounts and valid email addresses.

  2. Default Followers on Forum Creation (Optional):
    • Use Odoo Studio or development tools to make employees follow newly created posts automatically.

2. Use Automated Actions

To send an email notification to all employees when a new post is created, you can create a custom Automated Action.

Steps to Configure Automated Action:

  1. Activate Developer Mode:
    • Go to Settings > Activate Developer Mode.
  2. Create the Automated Action:
    • Navigate to Settings > Technical > Automation > Automated Actions.
    • Click Create and configure as follows:
      • Model: Forum Post (forum.post).
      • Trigger: On Creation.
      • Action To Do: Send Email.
  3. Configure Email Template:
    • In the same automated action, set up an email:
      • Recipients:
        • Select All Employees.
        • Alternatively, you can create a mailing list of employees.
      • Email Template:
        • Create a new email template to format the message with details about the forum post.
        • Example template:
          <p>Hello,</p>
          <p>A new forum post has been created:</p>
          <ul>
            <li>Title: ${object.name}</li>
            <li>Author: ${object.create_uid.name}</li>
            <li>Link: <a href="${object.website_url}">${object.website_url}</a></li>
          </ul>
          <p>Best regards,<br/>Odoo Forums</p>
          
  4. Test the Automated Action:
    • Create a new forum post and check if the email notification is sent successfully.

3. Enable Mailing via Odoo Studio

If you’re using Odoo Studio, you can directly add the email-sending logic without needing to write Python code.

Steps:

  1. Open the Forum module in Studio.
  2. Add a server action to the forum.post model:
    • Trigger: On Creation.
    • Action: Send Email.
  3. Use the template you created earlier to notify all employees.

4. Custom Python Code (Optional)

If you want more control, you can create a custom module to handle email notifications for forum posts.

Example Code:

from odoo import models, api

class ForumPost(models.Model):
    _inherit = 'forum.post'

    @api.model
    create(vals):
        # Call the original create method
        post = super(ForumPost, self).create(vals)

        # Notify employees
        employees = self.env['res.users'].search([('groups_id', 'in', self.env.ref('base.group_user').id)])
        for employee in employees:
            template = self.env.ref('module_name.new_forum_post_email_template')
            self.env['mail.template'].browse(template.id).send_mail(post.id, email_values={'recipient_ids': [(4, employee.partner_id.id)]})
        
        return post
  • Replace module_name.new_forum_post_email_template with the XML ID of your email template.
  • Place the code in a custom module, and ensure the module is installed.

5. Additional Tips

  • Unsubscribe Option:
    • If you notify all employees, provide a way for users to unsubscribe from notifications. Add a link in the email to manage subscriptions.
  • Performance Optimization:
    • For large organizations, sending emails to many users might slow down the system. Consider batching or using a queue.
  • Email Delivery Logs:
    • Navigate to Settings > Technical > Emails > Emails to check if emails are sent successfully.

By using these methods, you can ensure that all employees receive notifications whenever a new forum post is created. Let me know if you need further assistance or detailed guidance on implementing these steps!

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
<( Servicio al pasajero)||¿Cómo hablar directamente en Volaris?
mail
Avatar
0
Nov 25
603
Emails to Microsoft Outlook/Hotmail are rejected
mail
Avatar
1
Oct 25
1007
Anyone knows how to set iCloud+ mailing accounts to your own domain in Odoo?
mail
Avatar
Avatar
Avatar
2
Oct 25
1113
Followers in emails
mail
Avatar
Avatar
Avatar
3
Sep 25
2932
Remove buttons in emails to clients Solved
mail
Avatar
Avatar
Avatar
2
Oct 25
965
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now