
    Xj                     F    d dl mZmZmZmZ  G d dej
                        Zy)    )_apifieldsmodelsc                       e Zd ZdZdZdgZdZ ej                  dddd      Z	 ej                  g d	d
      Z ej                  dd      Z ej                  d      Z ej                  dej                  j                        Z ej"                         Z ej&                  d      Z ej*                  dd      Z ej"                  d      Zej2                   fd       Z xZS )XenoResignationzxeno.resignationz!Employee Resignation / Separationzmail.threadzresign_date desc, id desczhr.employeeTz[('active', '=', True)])requiredtrackingdomain))resignResign)end_of_contractzEnd of Contract)	discharge	Discharge)
retirement
Retirement)	terminate	Terminate)transferTransfer)	pass_awayz	Pass Away)r
   zResignation Date)stringr
   zNotice Period Start)r   zRecorded On)r   defaultDetail
Attachment)r   
attachmentzAttachment Filenamec                    t         |   |      }|D ]  }|j                  }|j                  ddi       t	        |j
                  d   j                        j                  |j                        xs t        d      }|j                  t        d||j                               |j                  s|j                  j                  ddi       |j                  t        d|j                  j                  	              |S )
NactiveFresign_typeunspecifiedz^Marked as resigned (%(resign_type)s) via resignation record #%(record_id)s. Employee archived.)r   	record_id)bodyzGLogin access for %(user_name)s deactivated as part of this resignation.)	user_name)supercreateemployee_idwritedict_fields	selectiongetr   r   message_postiduser_idname)self	vals_listrecordsrecordemployeeresign_type_label	__class__s         )xeno_resignation/models/hr_resignation.pyr%   zXenoResignation.create"   s    '.+ 	F))HNNHe,- $}-77!c&$$%!:)*=)9  !!@ 1VYY "    &&%'89%%/"*"2"2"7"7 & 	,     )__name__
__module____qualname___name_description_inherit_orderr   Many2oner&   	Selectionr   Dateresign_date
start_datecontext_today	save_dateCharcauseTextresignation_detailBinaryr   attachment_filenamer   model_create_multir%   __classcell__)r6   s   @r7   r   r      s    E6LH(F!&//t(K #&""	
 K &++%7$GK$9:J=&++:S:STIFKKME$H5ltDJ%&++-BC r8   r   N)odoor   r   r   r   Modelr    r8   r7   <module>rR      s    ' '7fll 7r8   