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.
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
| Fields | Trường dữ liệu | Description |
|---|---|---|
| Automated Action | Hành động tự động | Rule that executes automatically on trigger |
| Trigger | Kích hoạt | Event that activates action (On Create, On Update, On Delete) |
| Server Action | Hành động máy chủ | Python code or action executed on server |
| Filter Domain | Bộ lọc điều kiện | Condition for action execution |
| Activity | Hoạt động | Task/reminder attached to record |
| Follower | Người theo dõi | User 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
| Scenario | Configuration | Benefits |
|---|---|---|
| New employee onboarding | Model: 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 reminder | Model: hr.employee, Trigger: Based on Timed Condition (every Friday 4pm), Filter: [("timesheet_ids", "=", False)], Action: Send Email | Employees don't forget timesheets, reduce manual reminders |
| Auto-approve leave | Model: 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 notification | Model: 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 timesheet | Model: 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