Base Automation HR

Automate HR workflows with Automated Actions for HR module

Base Automation HR extends the Base Automation module to provide specialized automated actions for HR processes, automating employee onboarding, leave approvals, timesheet management, and notifications.

This module integrates deeply with HR, HR Holidays, and HR Timesheet to create automatic rules based on events like new employees, leave requests, pending timesheets, saving time and ensuring consistent processes.

HR Automation
Onboarding
Leave Approval
Timesheet
Notifications
Workflow

Key Features

Key points

  • • Automated Actions for HR: Auto-trigger on employee, leave, timesheet create/update

  • • Employee Onboarding: Auto-create tasks, send welcome emails, grant access for new hires

  • • Leave Approval Workflow: Auto-notify managers, escalate overdue requests

  • • Timesheet Automation: Remind employees to fill timesheets, auto-submit on weekends

  • • Notification Triggers: Send email/SMS/chatter on important events (birthdays, anniversaries)

  • • Conditional Actions: Execute actions based on complex conditions (department, job position)


Terminology

FieldsTrường dữ liệuDescription
Automated ActionHành động tự độngRule that executes automatically on trigger
TriggerKích hoạtEvent that activates action (On Create, On Update, On Delete)
Server ActionHành động máy chủPython code or action executed on server
Filter DomainBộ lọc điều kiệnCondition for action execution
ActivityHoạt độngTask/reminder attached to record
FollowerNgười theo dõiUser receiving notifications about record

Setup Process

Steps

  • 1. Activate module: Go to Apps, search "Base Automation HR", click Install. Requires Base Automation and HR installed.

  • 2. Create Automated Action: Go to Settings → Technical → Automation → Automated Actions, click New. Select Model: hr.employee (or hr.leave, hr.timesheet).

  • 3. Configure Trigger: Choose Trigger Condition: On Creation, On Update, Based on Form Modification, or Based on Timed Condition.

  • 4. Set Filter Domain: Click Edit Domain, add conditions like [("department_id.name", "=", "Sales")] to apply only to Sales department.

  • 5. Choose Action Type: Execute Python Code, Create Activity, Send Email, Add Followers, or Update Record.

  • 6. Test Action: Click Run Action to test with sample record. Check logs to ensure action runs correctly.


Real-world Examples

Common Use Cases

ScenarioConfigurationBenefits
New employee onboardingModel: hr.employee, Trigger: On Creation, Action: Create Activity (onboarding checklist), Send Email (welcome), Add Followers (HR manager)Automate onboarding process, ensure no steps missed
Timesheet reminderModel: hr.employee, Trigger: Based on Timed Condition (every Friday 4pm), Filter: [("timesheet_ids", "=", False)], Action: Send EmailEmployees don't forget timesheets, reduce manual reminders
Auto-approve leaveModel: hr.leave, Trigger: On Creation, Filter: [("number_of_days", "<=", 1)], Action: Execute Python (record.action_approve())1-day leave auto-approved, save manager time
Birthday notificationModel: hr.employee, Trigger: Based on Timed Condition (daily 9am), Filter: [("birthday", "=", today)], Action: Send Email (to team)Boost team morale, never miss birthdays
Escalate overdue timesheetModel: hr.timesheet, Trigger: Based on Timed Condition (daily), Filter: [("date", "<", today - 7 days), ("state", "=", "draft")], Action: Create Activity (assign to manager)Manager knows which timesheets need urgent attention

Best Practices

Key points

  • • Test Filter Domain thoroughly: Use Edit Domain to test conditions before activating

  • • Avoid infinite loops: If action updates record, ensure it doesn't trigger itself

  • • Use Activities over Emails: Activities are less spammy, easier to track in Odoo

  • • Log Python Code: Add _logger.info() in Python actions for debugging

  • • Careful with permissions: Actions run with creator's permissions, not trigger user

  • • Backup before deploy: Test actions on staging before production