
    ]{j                     >    d dl mZmZ  G d dej                        Zy)    )fieldsmodelsc                       e Zd ZdZdZdZdZ ej                  ddd      Z	 ej                  dddd	
      Z ej                  dd      Z ej                  d      Z ej                   dd      Zd Zy)XenoAttendanceDayoffaW  HR-granted day off for a single employee-day -- e.g. in exchange for
    overtime or extra-day working. On the Monthly Attendance report, that
    cell renders as "Off" (its own colour, like a holiday/weekend) instead
    of blank/Absent, and is excluded from the late-minutes total. No
    check-in/out is expected from the employee that day.zxeno.attendance.dayoffz8HR-granted employee day off (e.g. OT/extra-day comp off)zdate desc, employee_idzhr.employeeT)requiredindexzemployee_id.xeno_employee_codezHRSystem employee_code -- the join key the Monthly Attendance report matches this record against (same as Attendance Overrides). The chosen employee must already have one set.)relatedstorer   helpzDe.g. 'Comp off for OT on 1 Aug 2026' -- shown on the report tooltip.)r   zunique(employee_id, date)z;This employee already has a day off recorded for that date.c                     | D cg c]3  }|j                   |j                  j                  d|j                  f5 c}S c c}w )Nz @ )idemployee_idnamedate)selfrs     H/home/susu/odoo-hr-migration/xeno_attendance/models/attendance_dayoff.pyname_getzXenoAttendanceDayoff.name_get   s2    JNOQAMM$6$6?@OOOs   8A N)__name__
__module____qualname____doc___name_description_orderr   Many2oner   Charemployee_codeDater   reasonr   
Constraint_employee_date_uniqr        r   r   r      s    < %EML%F!&//-$dKKFKK0DJKM
 6;;D1DV[[deF+&++#E
Pr$   r   N)odoor   r   Modelr   r#   r$   r   <module>r'      s    P6<< Pr$   