Timesheet Control Rules & Compliance Limits
Administrator guide for configuring departmental compliance rules, submission deadlines, grace periods, and automated validation.
SmartERP 19 enforces compliance rules via smart.timesheet.control.rule, ensuring that all operating units record time reliably without administrative bottlenecks.

Compliance Rule Architecture#
Compliance rules are configured per company and can optionally target specific departments (department_ids):
| Field Technical Name | Field Type | Default Value | Enforcement Logic |
|---|---|---|---|
name | Char | Mandatory | Descriptive label (e.g., "Engineering Weekly Cutoff"). |
compliance_period | Selection | weekly | Frequency of compliance: weekly or biweekly. |
deadline_days_after_period | Integer | 2 | Days after period end when timesheet is due (e.g. Tuesday at 10:00 AM). |
grace_period_days | Integer | 1 | Extra days before triggering automated escalation warnings. |
reminder_enabled | Boolean | True | Enables automated email reminders to employees with missing hours. |
reminder_interval_days | Integer | 3 | Minimum gap between consecutive reminder emails. |
max_reminders | Integer | 3 | Number of reminders sent before handing over to the escalation ladder. |
escalation_enabled | Boolean | True | Activates management escalation lines upon grace period breach. |
Standard Validation Constraints#
+--------------------------------------------------------------------------+
| SYSTEM ENFORCEMENT CHECKS |
+--------------------------------------------------------------------------+
| [x] Daily Maximum: Cannot exceed 12.0 hours without overtime tag |
| [x] Task Scope: Cannot log time against closed or cancelled tasks |
| [x] Period Lock: Cannot post to dates on or before active Lock Date |
| [x] System Lines: Cannot edit leave lines generated by hr_holidays |
+--------------------------------------------------------------------------+
1. Protection of System-Generated Leave Lines#
Under native Odoo integration (project_timesheet_holidays), approved annual leaves and Ethiopian public holidays generate automated lines marked with smart_system_generated = True.
- Ordinary employees cannot alter or delete system-generated leave lines.
Attempting to overwrite an approved holiday triggers an
AccessError:"System-generated timesheet lines can only be created or modified by authorized HR administrators."
2. Daily Over-Allocation Guardrails#
If an employee attempts to record more than 12.0 hours in a single calendar day across multiple projects, SmartERP halts the commit with a ValidationError:
"Total logged duration for 2026-10-15 is 13.5 hours. Maximum allowed daily duration is 12.0 hours without prior management authorization."