
    Pj%                     B    d dl mZmZmZ  G d dej                        Zy)    )apifieldsmodelsc                       e Zd ZdZ ej
                  ddd      Z ej
                  dddd	
      Z ej                  dd      d        Z
y)HrLeaveAllocationzhr.leave.allocationUsed        a#  Days used against this allocation. Kept in sync automatically whenever a matching leave request is validated/unvalidated (see hr.leave._xeno_sync_allocation_used_days), but can also be corrected here directly by HR -- mirrors XENHR's leave_balances.used_days and its 'Revise Balance' action.)stringdefaulthelp	Remaining_compute_xeno_remaining_daysTzfnumber_of_days minus Used. Mirrors XENHR's allocated_days - used_days shown on the Leave Balance grid.)r
   computestorer   number_of_daysxeno_used_daysc                 ^    | D ](  }|j                   xs d|j                  xs dz
  |_        * y )Nr	   )r   r   xeno_remaining_days)selfallocs     ./models/leave_allocation.pyr   z.HrLeaveAllocation._compute_xeno_remaining_days   s7     	fE).)=)=)DI]I]Idad(eE%	f    N)__name__
__module____qualname___inheritr   Floatr   r   r   dependsr    r   r   r   r      si    $H!V\\sIN '&,,$BK S[[!#34f 5fr   r   N)odoor   r   r   Modelr   r   r   r   <module>r"      s    $ $f fr   