Skip to main content

Overtime & Official Business

Overtime (OT) and Official Business (OB) are two separate concepts that share similar approval mechanics. OT is extra work-hours beyond the regular schedule; OB is pre-approved time away from the office for legitimate work reasons (client visits, offsite meetings, training).

Audience

HR Administrators, approvers (via the backend or mobile app), payroll officers.

Data model

ModelPurpose
hr.filed.overtimePer-employee OT filing — start/end datetimes, reason, approval state.
hr.batch.ot.requestsBatch OT — one approver approves many employees in one transaction.
hr.obOfficial Business master (type/category).
hr.employee.obPer-employee OB filing.

OT and Batch OT live in a sibling module (hr17_tk) alongside hr17 — they are part of the same ONe-HR product suite.

Overtime filing

Most OT is filed from the mobile app. The backend view is used for:

  • HR admins filing on an employee's behalf (e.g. after an undocumented OT).
  • Approvers reviewing / modifying pending records.
  • Audit and reporting.

Lunch break deduction — the key rule

ONe-HR automatically deducts 1 hour for lunch when OT hours overlap with the scheduled lunch break (typically 12:00–13:00). The logic lives in the OT approval wizard:

  1. On approval, the system computes OT duration.
  2. If the OT window crosses the lunch break (hour_from to hour_from + 1 in resource.calendar terms), a wizard opens.
  3. The wizard shows the employee's schedule, the OT window, the lunch interval, and the adjusted duration.
  4. The approver can accept the default (deduct) or uncheck to skip.
  5. The resulting lunch_break_deducted flag is stored on the OT record for DTR and payroll computation.
Why this matters

Without this rule, an employee could log 8h–19h as 11h of OT — when in practice they took lunch like everyone else. The 1-hour deduction is the conservative default; approvers with evidence of continuous work (e.g. client meeting through lunch) can uncheck it per case.

Batch OT approvals

For end-of-month catch-up approvals, the Batch OT Approval wizard groups pending OTs from the same period. The wizard:

  • Shows every employee with a pending OT.
  • Highlights which have lunch-overlap (pre-selected for deduction, colored green).
  • Lets the approver toggle deduction per employee.
  • Approves them all in a single commit.

The approval decision (deduction or no deduction) is posted to the batch chatter for audit.

Official Business (OB)

OB has two faces in ONe-HR:

The OB category master (hr.ob)

A reference model — typical categories: "Client Visit", "Supplier Meeting", "Training", "Field Work". Administered via HR ▸ Maintenance ▸ Official Business Types.

The employee OB filing (hr.employee.ob)

One row per OB request. Fields:

FieldPurpose
NameDescription of the OB activity.
DateOB date.
DescriptionDetails — location, counterparts, deliverables.
AmountOptional — for OBs that carry a per-diem or reimbursement.
Statusactive / revoked / discontinued.

The mobile app OB flow (docs) writes directly to this model. Backend admins see the same record.

The resource calendar

The lunch-break logic depends on resource.calendar attendance records with day_period='morning'. The module extends resource.calendar (models/resource_calendar.py) to auto-name new calendars after the company and to seed a default 7:30–16:30 schedule for Mon–Sat if none exists.

Each BU typically has one base calendar plus per-employee calendars for shifts that differ from the default. Edit under Settings ▸ Technical ▸ Working Schedules (requires developer mode).

Approver chain for OT/OB

OT and OB approvers are set on the employee form (ot_approver_ids, ob_approver_ids Many2many). See Organization for the assignment UI. Every approver in the chain receives a notification; any one of them can approve (not all-must-approve).