Skip to content
Home » Creating and Managing Alerts in Odoo 18 Referrals: A Complete Guide

Creating and Managing Alerts in Odoo 18 Referrals: A Complete Guide

Odoo 18 referral alerts

Creating and managing alerts in Odoo 18 referrals enhances internal communication and streamlines your recruitment process efficiently. Alerts serve as a powerful tool to notify employees about new job openings, reward updates, and other important information, making it easier to engage them in the recruitment process while reducing hiring costs.

Why Odoo 18 Referral Alerts Matter for Your Business

Effective communication remains at the heart of successful recruitment strategies. Therefore, implementing a robust alert system in your Odoo 18 referral module creates numerous advantages for your organization. First and foremost, these alerts help you tap into your most valuable recruitment resource – your existing employees.

According to LinkedIn research, employee referrals typically lead to faster hiring times, better cultural fits, and longer employee retention rates. Consequently, Odoo 18’s alert system serves as the perfect bridge between your hiring needs and your employees’ networks.

Key Benefits of Using Referral Alerts

Before diving into the technical aspects, let’s understand why alert management in Odoo 18 referrals deserves your attention:

  1. Improved Employee Engagement: Alerts actively involve your team in the recruitment process
  2. Cost Reduction: Referrals generally cost less than traditional recruitment methods
  3. Higher Quality Candidates: Employees typically refer qualified candidates who match your company culture
  4. Faster Hiring Process: Referrals often move through the hiring pipeline more quickly
  5. Increased Transparency: Alerts keep everyone informed about current hiring needs

Setting Up Alerts in Odoo 18 Referrals Step-by-Step

Now, let’s explore how to create and manage these powerful communication tools in your Odoo 18 environment. First, you need to understand that only users with administrator access rights to the recruitment application can create alerts.

Accessing the Referrals Module

To begin creating alerts, you need to navigate to the referrals application in your Odoo 18 dashboard:

  1. Log into your Odoo 18 dashboard
  2. Locate and click on the “Referrals” application
  3. This will take you to the referrals dashboard where you can post messages (alerts)

Creating Your First Alert

Now that you’re in the referrals application, follow these steps to create a new alert:

  1. Click on “Configuration” in the top menu
  2. Select “Alerts” from the dropdown menu
  3. On the alerts page, you’ll see all existing alerts with their details
  4. Click “New” in the top-left corner to create a fresh alert

Configuring Alert Settings

When creating a new alert, you need to configure several important settings:

1. Alert Timeframe

Set when the alert will appear and disappear:

# Alert Date Fields
start_date = fields.Date(string="Start Date", required=True, default=fields.Date.today)
end_date = fields.Date(string="End Date", required=True, default=lambda self: fields.Date.today() + timedelta(days=14))

The start date determines when your alert becomes visible on the dashboard, while the end date indicates when the system will automatically hide it. For optimal visibility, consider setting a two-week timeframe for standard recruitment alerts.

2. Alert Message

This is the actual content that employees will see:

message = fields.Text(string="Alert Message", required=True, 
    help="The message that will appear on the referral dashboard")

Craft a clear, concise message that communicates the position you’re recruiting for. For example: “We’re recruiting a Marketing Specialist! Know someone creative? Refer them today!”

3. Click Action

Determine what happens when someone clicks on your alert:

action_type = fields.Selection([
    ('no_click', 'Non-Clickable Alert'),
    ('all_jobs', 'Open All Jobs'),
    ('specific_job', 'Open Specific Job URL')
], string="Click Action", default='no_click', required=True)
specific_url = fields.Char(string="Specific URL", 
    help="URL that will open when the alert is clicked")

You have three options:

  • Non-Clickable Alert: Displays text without any link
  • Open All Jobs: Clicking takes users to the webpage listing all current job openings
  • Open Specific Job URL: Links to a specific job listing (requires adding the URL)

For our marketing specialist example, the third option works best, linking directly to the marketing position details.

Notifying Employees About the Alert

Creating an alert is just the first step. To ensure employees see it:

  1. Click the “Send Email” button at the top of the alert form
  2. By default, all users in the database are selected
  3. You can remove specific users by clicking the “X” next to their names
  4. The email subject and body are pre-filled, including a direct link to the referral dashboard
  5. Click “Send” to notify employees
def action_send_mail(self):
    self.ensure_one()
    template = self.env.ref('hr_referral.referral_alert_mail_template')
    compose_form = self.env.ref('mail.email_compose_message_wizard_form')
    ctx = dict(
        default_model='hr.referral.alert',
        default_res_id=self.id,
        default_use_template=bool(template),
        default_template_id=template.id,
        default_composition_mode='comment',
    )
    return {
        'name': _('Compose Email'),
        'type': 'ir.actions.act_window',
        'view_mode': 'form',
        'res_model': 'mail.compose.message',
        'views': [(compose_form.id, 'form')],
        'view_id': compose_form.id,
        'target': 'new',
        'context': ctx,
    }

This code handles the email composition and sending process, allowing you to quickly notify all relevant employees about the new alert.

Advanced Alert Management Techniques

Beyond the basics, Odoo 18 referrals offer several advanced features for alert management.

Multi-Company Alert Management

If you work across multiple databases, you can display alerts to users from other companies:

company_id = fields.Many2one('res.company', string='Company', 
    default=lambda self: self.env.company)

Simply select the desired company from the dropdown menu when creating your alert.

Alert Visibility Control

You can manage who sees which alerts using Odoo’s access right system:

class HrReferralAlert(models.Model):
    _name = 'hr.referral.alert'
    _description = 'Referral Alert'
    _order = 'create_date DESC'

    def _get_default_access_group(self):
        # Default access group for viewing alerts
        return self.env.ref('hr_referral.group_hr_referral_user').id

    access_group_id = fields.Many2one('res.groups', string='Access Group', 
        default=_get_default_access_group, 
        help='Group of users who can see this alert')

By leveraging this feature, you can create department-specific alerts, ensuring only relevant employees receive notifications about certain positions.

Automating Alert Creation

For recurring recruitment needs, consider automating alert creation:

from odoo import models, fields, api
from datetime import timedelta

class HrReferralAlertAutomation(models.Model):
    _name = 'hr.referral.alert.automation'
    _description = 'Automated Referral Alerts'

    name = fields.Char(string="Automation Name", required=True)
    job_id = fields.Many2one('hr.job', string="Job Position", required=True)
    frequency = fields.Selection([
        ('weekly', 'Weekly'),
        ('monthly', 'Monthly'),
        ('quarterly', 'Quarterly')
    ], string="Frequency", default='monthly', required=True)
    message_template = fields.Text(string="Alert Message Template", required=True)
    active = fields.Boolean(default=True)

    @api.model
    def _cron_create_alerts(self):
        # Method to be called by scheduled action
        for automation in self.search([('active', '=', True)]):
            # Create alert based on the automation settings
            self.env['hr.referral.alert'].create({
                'message': automation.message_template.replace('{job}', automation.job_id.name),
                'action_type': 'specific_job',
                'specific_url': '/jobs/detail/%s' % automation.job_id.id,
                'start_date': fields.Date.today(),
                'end_date': fields.Date.today() + timedelta(days=14),
            })

This custom extension would allow you to schedule alerts for positions that frequently need referrals.

Measuring Alert Effectiveness

To gauge the impact of your alerts, Odoo 18 provides tracking capabilities:

Referral Analytics

Access the analytics section to view metrics related to your alerts:

  1. Navigate to Referrals > Reporting > Dashboard
  2. Look for the “Referrals by Source” chart
  3. Compare periods before and after implementing specific alerts
def _compute_referral_stats(self):
    for alert in self:
        start_date = alert.start_date
        end_date = alert.end_date
        
        # Get referrals created during alert period
        domain = [
            ('create_date', '>=', start_date),
            ('create_date', '<=', end_date)
        ]
        
        if alert.action_type == 'specific_job' and alert.specific_url:
            job_id = alert.specific_url.split('/')[-1]
            domain.append(('job_id', '=', int(job_id)))
            
        alert.referral_count = self.env['hr.referral'].search_count(domain)

This example code shows how you might compute statistics for each alert to track its effectiveness.

Click-Through Rate Tracking

For clickable alerts, monitoring engagement helps optimize future communications:

class HrReferralAlertClick(models.Model):
    _name = 'hr.referral.alert.click'
    _description = 'Alert Click Tracking'
    
    alert_id = fields.Many2one('hr.referral.alert', string="Alert", required=True)
    user_id = fields.Many2one('res.users', string="User", required=True)
    click_date = fields.Datetime(string="Click Date", default=fields.Datetime.now)
    
    @api.model
    def track_click(self, alert_id):
        self.create({
            'alert_id': alert_id,
            'user_id': self.env.user.id,
        })

This custom tracking system would allow you to see which alerts generate the most interest and engagement from your employees.

Best Practices for Odoo 18 Referral Alerts

To maximize the effectiveness of your alerts, consider these proven strategies:

1. Keep Messages Clear and Concise

Employees quickly scan the dashboard, so make your alert messages direct and easy to understand:

❌ “Our organization is currently seeking individuals who possess extensive experience in digital marketing strategies and social media campaign management to join our growing team.”

✅ “Hiring Marketing Specialist! Know someone great? Refer now for rewards!”

2. Use Strategic Timing

Schedule alerts to appear when they’ll get maximum visibility:

def _get_optimal_posting_time(self):
    # Example logic to determine best posting time
    # e.g., Monday mornings often have higher dashboard visibility
    weekday = fields.Date.today().weekday()
    if weekday == 0:  # Monday
        return fields.Date.today()
    else:
        # Find next Monday
        days_until_monday = 7 - weekday
        return fields.Date.today() + timedelta(days=days_until_monday)

Consider company-specific patterns in dashboard usage to optimize alert timing.

3. Highlight Incentives

Make sure employees know what’s in it for them:

We're hiring a DevOps Engineer! Successful referrals earn 1,000 reward points. Refer now!

Including the reward information directly in the alert increases motivation to participate.

4. Rotate and Refresh Alerts

Even with the auto-hide feature, regularly update your alerts to maintain employee interest:

def refresh_alert_content(self):
    # Example method to update alert message with fresh content
    positions = []
    for job in self.env['hr.job'].search([('state', '=', 'recruit')]):
        positions.append(job.name)
    
    if positions:
        self.message = "Hot positions this week: %s. Refer and earn rewards!" % ", ".join(positions)

Weekly refreshes help keep your referral program top-of-mind for employees.

Troubleshooting Common Alert Issues

Even with Odoo’s intuitive interface, you might encounter some challenges with the alert system.

Alert Not Displaying

If your alert doesn’t appear on the dashboard:

  1. Check the start and end dates to ensure they’re current
  2. Verify user access rights (only users with access to the referral app will see alerts)
  3. Make sure the alert hasn’t been manually closed by the user
def action_reset_visibility(self):
    # Reset visibility for all users who have closed this alert
    self.env['hr.referral.alert.user'].search([
        ('alert_id', '=', self.id)
    ]).unlink()
    return {'type': 'ir.actions.act_window_close'}

This custom method would allow you to reset alert visibility for all users.

Email Notification Issues

If employees don’t receive email notifications:

  1. Check your Odoo email configuration in the general settings
  2. Verify that the email addresses of employees are correct
  3. Look in the email queue for any failed deliveries
# Check Odoo email queue from command line
sudo tail -f /var/log/odoo/odoo-server.log | grep "Mail delivery failed"

Alert Click Action Not Working

If the alert doesn’t redirect properly when clicked:

  1. For specific job URLs, ensure the URL format is correct and the job posting is active
  2. Check for any custom modules that might interfere with the standard behavior
  3. Verify that the user has access to the destination page

Integrating Alerts with the Broader Recruitment Strategy

Alerts work best as part of a comprehensive recruitment approach:

Coordinating with HR Campaigns

Time your alerts to coincide with broader HR initiatives:

def align_with_recruitment_campaigns(self):
    # Find active recruitment campaigns
    campaigns = self.env['hr.recruitment.campaign'].search([
        ('state', '=', 'active'),
        ('date_start', '<=', fields.Date.today()),
        ('date_end', '>=', fields.Date.today())
    ])
    
    for campaign in campaigns:
        # Create aligned alerts for campaign positions
        for job in campaign.job_ids:
            self.env['hr.referral.alert'].create({
                'message': "Join our %s campaign: We're hiring %s. Refer now!" % 
                          (campaign.name, job.name),
                'action_type': 'specific_job',
                'specific_url': '/jobs/detail/%s' % job.id,
                'start_date': fields.Date.today(),
                'end_date': campaign.date_end,
            })

Tying Alerts to Reward Updates

Whenever you update your referral rewards, create an alert to generate excitement:

New reward tier unlocked! Successful senior-level referrals now earn 2,500 points. Check open positions now!

This practice drives both awareness of the rewards program and encourages participation.

Extending Odoo 18 Referral Alerts with Custom Development

For organizations with specific needs, Odoo’s framework allows for extensive customization.

Creating Personalized Alert Recommendations

Develop a system that recommends positions based on employee departments:

class HrReferralAlertPersonalized(models.Model):
    _inherit = 'hr.referral.alert'
    
    is_personalized = fields.Boolean(string="Personalized Alerts", default=False)
    department_ids = fields.Many2many('hr.department', string="Target Departments")
    
    def _get_target_users(self):
        if not self.is_personalized:
            return super()._get_target_users()
            
        users = self.env['res.users']
        for department in self.department_ids:
            department_employees = self.env['hr.employee'].search([
                ('department_id', '=', department.id)
            ])
            for employee in department_employees:
                if employee.user_id:
                    users |= employee.user_id
        return users

With this extension, you could create technical job alerts specifically for your IT department or marketing position alerts for your creative teams.

Adding Rich Media to Alerts

Enhance engagement with more dynamic alert content:

class HrReferralAlertEnhanced(models.Model):
    _inherit = 'hr.referral.alert'
    
    use_rich_content = fields.Boolean(string="Use Rich Content", default=False)
    html_content = fields.Html(string="Rich Content")
    
    def get_display_content(self):
        self.ensure_one()
        if self.use_rich_content and self.html_content:
            return self.html_content
        return self.message

This would allow you to include formatting, icons, or even small embedded images in your alerts.

Future of Alert Management in Odoo

As Odoo continues to evolve, we can expect even more powerful alert features in upcoming versions:

Predictive Alert Timing

Future versions might incorporate AI to recommend optimal alert timing based on user engagement patterns:

def _recommend_optimal_timing(self):
    # Placeholder for AI-based timing recommendations
    user_activity = self.env['web.user.activity'].read_group(
        [('create_date', '>=', fields.Datetime.now() - timedelta(days=30))],
        ['hour', 'day_of_week', 'count'],
        ['hour', 'day_of_week']
    )
    
    # Find peak activity times
    peak_times = sorted(user_activity, key=lambda x: x['count'], reverse=True)
    if peak_times:
        peak_day = peak_times[0]['day_of_week']
        peak_hour = peak_times[0]['hour']
        return "Consider posting on %s around %s:00" % (peak_day, peak_hour)
    return "Insufficient data for recommendations"

Enhanced Analytics Integration

Future releases might offer deeper integration between alerts and recruitment analytics:

def _compute_alert_conversion_rate(self):
    for alert in self:
        clicks = self.env['hr.referral.alert.click'].search_count([
            ('alert_id', '=', alert.id)
        ])
        
        referrals = self.env['hr.referral'].search_count([
            ('create_date', '>=', alert.start_date),
            ('create_date', '<=', alert.end_date + timedelta(days=2))
        ])
        
        alert.click_count = clicks
        alert.referral_count = referrals
        alert.conversion_rate = (referrals / clicks) * 100 if clicks else 0

Such metrics would help recruitment teams continuously optimize their alert strategy.

Conclusion: Maximizing the Value of Odoo 18 Referral Alerts

Creating and managing alerts in Odoo 18 referrals provides a powerful tool for enhancing your recruitment process. Through strategic implementation of these notifications, you can effectively engage employees in your hiring efforts, reduce recruitment costs, and find higher-quality candidates.

The key to success lies in creating clear, targeted alerts that provide value to employees while making the referral process as frictionless as possible. By following the steps and best practices outlined in this guide, you’ll be well on your way to building a more engaged referral network within your organization.

Remember that alerts serve as just one component of a comprehensive referral strategy. When combined with attractive incentives, streamlined processes, and regular communication, they become a powerful catalyst for employee participation.

Ready to take your Odoo 18 referral program to the next level? Start by implementing these alert strategies today, and watch your employee engagement—and your candidate pipeline—grow.

Additional Resources

Do you have questions about implementing alerts in your Odoo 18 referral system? Let us know in the comments below!


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

Leave a Reply

WP Twitter Auto Publish Powered By : XYZScripts.com