403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/erp/offboarding/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/offboarding/__pycache__/models.cpython-310.pyc
o

hͦh�*�@s�ddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddl m!Z!m"Z"ddl#m$Z$Gdd�de�Z%Gdd�de�Z&eee%d�dd��Z'Gdd�de�Z(Gdd�de�Z)Gdd�de�Z*Gdd �d e�Z+Gd!d"�d"e�Z,Gd#d$�d$e�Z-Gd%d&�d&e�Z.Gd'd(�d(e�Z/d)S)*�)�Iterable)�date�	timedelta)�apps)�User)�models)�	post_save)�receiver)�gettext_lazy)�HorillaCompanyManager)�Company)�Employee)�horilla_middlewares)�_thread_locals)�get_horilla_model_class)�HorillaModel)�HorillaAuditInfo�HorillaAuditLog)�notifycs�eZdZdZded�fded�fgZejdd�Zej	dd�Z
e�e�Z
ejd	ded
�Zejeejddd
�Zed�Zdd�Z�fdd�Z�ZS)�Offboarding�
    Offboarding model
    �ongoing�Ongoing�	completed�	Completed���
max_length��
)r�default�choicesTr)�	on_delete�null�verbose_name�
company_idcC�|jS�N��title��self�r,�"/var/www/erp/offboarding/models.py�__str__*�zOffboarding.__str__cs\|j}t�j|i|��|r,gd�}|D]}t�}||_|d|_|d|_|��qdS)N))zExit interview�	interview)z
Work Handover�handover)�FNF�fnf)�Farewell�other)�Archived�archivedr�)�pk�super�save�OffboardingStage�offboarding_idr)�type)r+�args�kwargs�is_new�stages�stage�new��	__class__r,r-r;-s


zOffboarding.save)�__name__�
__module__�__qualname__�__doc__�_�statusesr�	CharFieldr)�	TextField�description�ManyToManyFieldr
�managers�status�
ForeignKeyr�CASCADEr%r�objectsr.r;�
__classcell__r,r,rEr-rs 
�rc@s�eZdZdZded�fded�fded�fded	�fd
ed�fded
�fgZejdd�Zejded�Z	ej
eejd�Z
e�e�Zejddd�Zdefdd�Zdd�ZdS)r<r�
notice_periodz
Notice periodr3zFnF Settlementr5�Otherr0�	Interviewr1z
Work handoverr7r6rr�
)rr!�r"rF)r �editable�returncCs
t|j�Sr')�strr)r*r,r,r-r.V�
zOffboardingStage.__str__cCs
|jdkS)zF
        This method is to check the stage is archived or not
        r7)r>r*r,r,r-�is_archived_stageYs
z"OffboardingStage.is_archived_stageN)rGrHrIrJrK�typesrrMr)r>rSrrTr=rPr
rQ�IntegerField�sequencer^r.r`r,r,r,r-r<Bs 





�	
r<)�sendercKs,|rt�}d|_||_d|_|��dSdS)zT
    This is post save method, used to create initial stage for the recruitment
    z
Notice PeriodrWN)r<r)r=r>r;)rd�instance�createdr@�
initial_stager,r,r-�create_initial_stage`s�rhc@seZdZdZejdd�ZdS)�OffboardingStageMultipleFilez&
    OffboardingStageMultipleFile
    zoffboarding/attachments)�	upload_toN)rGrHrIrJr�	FileField�
attachmentr,r,r,r-rimsric@s�eZdZdZddgZejeejdd�Z	ej
eejddd�Zej
dd	�Zejd
eddd�Zejdd	�Zejddd
�Zedd�Zdefdd�ZdS)�OffboardingEmployeez7
    OffboardingEmployee model / Employee on stage
    )�day�days)�month�Monthr
�r"r$�StageT�r"r$r#)r#rrp)rr!r r#)r#�blank�+employee_id__employee_work_info__company_id��related_company_fieldr]cCs
|j��Sr')�employee_id�
get_full_namer*r,r,r-r.�r_zOffboardingEmployee.__str__N)rGrHrIrJ�unitsr�
OneToOneFieldr
rTryrSr<�stage_idrbrWrM�unit�	DateField�notice_period_starts�notice_period_endsrrUr^r.r,r,r,r-rmus"�
��rmcs�eZdZdZded�fded�fded�fgZejeej	dd	�Z
ejd
dd�Zej
dd
d�Ze��Zejdedd�Zejeej	ddd�Zedd�Z�fdd�Zdd�Z�ZS)�ResignationLetterz,
    Resignation Request Employee model
    �	requested�	Requested�approved�Approved�rejected�Rejectedr
rr�dT)rr#r)r#rr�rr!r F)r"r\r#rvrwcs"t�j|i|��|jdkr	dS)Nr�)r:r;rR)r+r?r@rEr,r-r;�s
zResignationLetter.savecCstjj|jd���}|r|nt�}|j|_tj�d�j|d���|_t�	d�r6t
ddd�jj|jdd���nd	}z
|rB|t|j�n|}Wn|}Y||_
||_|r�|r�t|t�s�t|t�s�t|j|j|jd
�t|j|j|jd
�}|j}|dkr}|nd	|_|dkr�dnd	|_|��d	S)
zL
        This method is used to convert/add employee to offboarding
        )ry�
created_at)r=�payroll�contract)�	app_label�model�active)ry�contract_statusN)rnrp�yearrrn)rmrU�filterry�firstr<�order_byr}r�is_installedrr�notice_period_in_daysr�r��
isinstancer^rrnrpr�rorWr~r;)r+�offboardingr�r��offboarding_employee�contract_notice_end_date�diffsr,r,r-�to_offboarding_employee�sl���
��	�
������������	z)ResignationLetter.to_offboarding_employee)rGrHrIrJrKrLrrSr
rTryrMr)rNrOr�planned_to_leave_onrRrm�offboarding_employee_idrrUr;r�rVr,r,rEr-r��s*


��
��r�c@sXeZdZdZejdd�Ze�e�Z	ej
eejdddd�Z
Gdd�d�Zd	efd
d�ZdS)
�OffboardingTaskz
    OffboardingTask model
    �rrsT)r"r$r#ruc@�eZdZddgZdS)zOffboardingTask.Metar)r}N�rGrHrI�unique_togetherr,r,r,r-�Meta��r�r]cCr&r'r(r*r,r,r-r.�r/zOffboardingTask.__str__N)rGrHrIrJrrMr)rPr
rQrSr<�PROTECTr}r�r^r.r,r,r,r-r��s
�r�cs�eZdZdZded�fded�fded�fded	�fgZejeej	d
dd�Z
ejd
edd�Zeje
ej	d�Zejdddd�Zedegd�ZGdd�d�Z�fdd�Z�ZS)�EmployeeTaskz
    EmployeeTask model
    �todo�Todo�in_progresszIn progress�stuck�Stuckrrr
Trtrr�r[Fr)r#r\r�history_set)�related_name�basesc@r�)zEmployeeTask.Metary�task_idNr�r,r,r,r-r�r�r�csTt�j|i|��ttdd�}tj|jj|jjj	d|j
j�d�����ddd�	dS)N�requestzOffboarding task "z" has been assignedz offboarding/offboarding-pipeline�information)�	recipient�verb�verb_ar�verb_de�verb_es�verb_fr�redirect�icon)r:r;�getattrrr�send�user�employee_getry�employee_user_idr�r))r+r?r@r�rEr,r-r;s
�zEmployeeTask.save)rGrHrIrJrKrLrrSrmrTryrMrRr�r�rNrOrr�historyr�r;rVr,r,rEr-r��s.



����r�c@sBeZdZdZejdd�Zejdd�Zej	e
ejd�Ze�
e�ZdS)�
ExitReasonz
    ExitReason model
    �2rrr[N)rGrHrIrJrrMr)rNrOrSrmr�r�rPri�attachmentsr,r,r,r-r�+s�r�cs�eZdZdZejeddd�Zejdddd�Z	ej
eejddd�Z
ej
eejddd�Zej
eejddd�ZGdd	�d	�Z�fd
d�Z�ZS)�OffboardingNotez
    OffboardingNote
    TF)rur\r)r#rur)r"r#r\c@seZdZdgZdS)zOffboardingNote.Metaz-created_atN)rGrHrI�orderingr,r,r,r-r�Ks
r�csBttjdd�}|r|jj}||_|jr|jj|_t�j	|i|��S)Nr�)
r�rrr�r��note_byryr}r:r;)r+r?r@r��
updated_byrEr,r-r;Ns
zOffboardingNote.save)rGrHrIrJrrPrir�rNrOrSr
�SET_NULLr�rmr�ryr<r}r�r;rVr,r,rEr-r�8s"�
�
�
�r�c@s.eZdZdZejdd�Zejeej	dd�Z
dS)�OffboardingGeneralSettingz$
    OffboardingGeneralSettings
    F)r T)r"r#N)rGrHrIrJr�BooleanField�resignation_requestrSrrTr%r,r,r,r-r�Xsr�N)0�collections.abcr�datetimerr�django.appsr�django.contrib.auth.modelsr�	django.dbr�django.db.models.signalsr�django.dispatchr	�django.utils.translationr
rK�base.horilla_company_managerr�base.modelsr�employee.modelsr
�horillar�horilla.horilla_middlewaresr�horilla.methodsr�horilla.modelsr�horilla_audit.modelsrr�notifications.signalsrrr<rhrirmr�r�r�r�r�r�r,r,r,r-�<module>s:*

Z.
 

Youez - 2016 - github.com/yon3zu
LinuXploit