brotherton-erpnext/erpnext/docs/current/models/hr/leave_application.md

24 KiB

Version 6.x.x
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/leave_application"
	target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
<p><b>Table Name:</b> <code>tabLeave Application</code></p>

Apply / Approve Leaves

Fields

    <tr >
        <td>1</td>
        <td ><code>status</code></td>
        <td >
            Select</td>
        <td >
            Status
            
        </td>
        <td>
            <pre>Open

Approved Rejected

    <tr >
        <td>2</td>
        <td ><code>column_break_12</code></td>
        <td class="info">
            Column Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>3</td>
        <td class="danger" title="Mandatory"><code>leave_type</code></td>
        <td >
            Link</td>
        <td >
            Leave Type
            
        </td>
        <td>

Leave Type

        </td>
    </tr>
    
    <tr >
        <td>4</td>
        <td ><code>leave_balance</code></td>
        <td >
            Float</td>
        <td >
            Leave Balance Before Application
            
        </td>
        <td></td>
    </tr>
    
    <tr class="info">
        <td>5</td>
        <td ><code>section_break_5</code></td>
        <td >
            Section Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>6</td>
        <td class="danger" title="Mandatory"><code>from_date</code></td>
        <td >
            Date</td>
        <td >
            From Date
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>7</td>
        <td class="danger" title="Mandatory"><code>to_date</code></td>
        <td >
            Date</td>
        <td >
            To Date
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>8</td>
        <td ><code>half_day</code></td>
        <td >
            Check</td>
        <td >
            Half Day
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>9</td>
        <td ><code>total_leave_days</code></td>
        <td >
            Float</td>
        <td >
            Total Leave Days
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>10</td>
        <td ><code>column_break1</code></td>
        <td class="info">
            Column Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>11</td>
        <td ><code>description</code></td>
        <td >
            Small Text</td>
        <td >
            Reason
            
        </td>
        <td></td>
    </tr>
    
    <tr class="info">
        <td>12</td>
        <td ><code>section_break_7</code></td>
        <td >
            Section Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>13</td>
        <td class="danger" title="Mandatory"><code>employee</code></td>
        <td >
            Link</td>
        <td >
            Employee
            
        </td>
        <td>

Employee

        </td>
    </tr>
    
    <tr >
        <td>14</td>
        <td ><code>employee_name</code></td>
        <td >
            Data</td>
        <td >
            Employee Name
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>15</td>
        <td ><code>column_break_15</code></td>
        <td class="info">
            Column Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>16</td>
        <td ><code>leave_approver</code></td>
        <td >
            Link</td>
        <td >
            Leave Approver
            
        </td>
        <td>

User

        </td>
    </tr>
    
    <tr >
        <td>17</td>
        <td ><code>leave_approver_name</code></td>
        <td >
            Read Only</td>
        <td >
            Leave Approver Name
            
        </td>
        <td></td>
    </tr>
    
    <tr class="info">
        <td>18</td>
        <td ><code>sb10</code></td>
        <td >
            Section Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>19</td>
        <td class="danger" title="Mandatory"><code>posting_date</code></td>
        <td >
            Date</td>
        <td >
            Posting Date
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>20</td>
        <td ><code>follow_via_email</code></td>
        <td >
            Check</td>
        <td >
            Follow via Email
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>21</td>
        <td ><code>column_break_17</code></td>
        <td class="info">
            Column Break</td>
        <td >
            
            
        </td>
        <td></td>
    </tr>
    
    <tr >
        <td>22</td>
        <td class="danger" title="Mandatory"><code>company</code></td>
        <td >
            Link</td>
        <td >
            Company
            
        </td>
        <td>

Company

        </td>
    </tr>
    
    <tr >
        <td>23</td>
        <td ><code>letter_head</code></td>
        <td >
            Link</td>
        <td >
            Letter Head
            
        </td>
        <td>

Letter Head

        </td>
    </tr>
    
    <tr >
        <td>24</td>
        <td ><code>amended_from</code></td>
        <td >
            Link</td>
        <td >
            Amended From
            
        </td>
        <td>

Leave Application

        </td>
    </tr>
    
</tbody>
Sr Fieldname Type Label Options
<hr>
<h3>Controller</h3>
<h4>erpnext.hr.doctype.leave_application.leave_application</h4>






    
<h3 style="font-weight: normal;">Class <b>InvalidLeaveApproverError</b></h3>

<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>

<div class="docs-attr-desc"><p></p>
</div>
<hr>




    
<h3 style="font-weight: normal;">Class <b>LeaveApplication</b></h3>

<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>

<div class="docs-attr-desc"><p></p>
<p class="docs-attr-name">
    <a name="get_feed" href="#get_feed" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>get_feed</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="notify" href="#notify" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>notify</b>
    <i class="text-muted">(self, args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="notify_employee" href="#notify_employee" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>notify_employee</b>
    <i class="text-muted">(self, status)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="notify_leave_approver" href="#notify_leave_approver" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>notify_leave_approver</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="on_cancel" href="#on_cancel" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>on_cancel</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="on_submit" href="#on_submit" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>on_submit</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="on_update" href="#on_update" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>on_update</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="show_block_day_warning" href="#show_block_day_warning" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>show_block_day_warning</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate" href="#validate" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_back_dated_application" href="#validate_back_dated_application" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_back_dated_application</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_balance_leaves" href="#validate_balance_leaves" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_balance_leaves</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_block_days" href="#validate_block_days" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_block_days</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_dates" href="#validate_dates" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_dates</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_dates_acorss_allocation" href="#validate_dates_acorss_allocation" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_dates_acorss_allocation</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_leave_approver" href="#validate_leave_approver" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_leave_approver</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_leave_overlap" href="#validate_leave_overlap" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_leave_overlap</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="validate_max_days" href="#validate_max_days" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	<b>validate_max_days</b>
    <i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

</div>
<hr>




    
<h3 style="font-weight: normal;">Class <b>LeaveApproverIdentityError</b></h3>

<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>

<div class="docs-attr-desc"><p></p>
</div>
<hr>




    
<h3 style="font-weight: normal;">Class <b>LeaveDayBlockedError</b></h3>

<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>

<div class="docs-attr-desc"><p></p>
</div>
<hr>




    
<h3 style="font-weight: normal;">Class <b>OverlapError</b></h3>

<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>

<div class="docs-attr-desc"><p></p>
</div>
<hr>




    


<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.add_block_dates" href="#erpnext.hr.doctype.leave_application.leave_application.add_block_dates" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>add_block_dates</b>
    <i class="text-muted">(events, start, end, employee, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.add_department_leaves" href="#erpnext.hr.doctype.leave_application.leave_application.add_department_leaves" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>add_department_leaves</b>
    <i class="text-muted">(events, start, end, employee, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.add_holidays" href="#erpnext.hr.doctype.leave_application.leave_application.add_holidays" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>add_holidays</b>
    <i class="text-muted">(events, start, end, employee, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.add_leaves" href="#erpnext.hr.doctype.leave_application.leave_application.add_leaves" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>add_leaves</b>
    <i class="text-muted">(events, start, end, match_conditions=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_approved_leaves_for_period" href="#erpnext.hr.doctype.leave_application.leave_application.get_approved_leaves_for_period" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_approved_leaves_for_period</b>
    <i class="text-muted">(employee, leave_type, from_date, to_date)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p><span class="label label-info">Public API</span>
    <br><code>/api/method/erpnext.hr.doctype.leave_application.leave_application.get_approvers</code>
</p>
<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_approvers" href="#erpnext.hr.doctype.leave_application.leave_application.get_approvers" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_approvers</b>
    <i class="text-muted">(doctype, txt, searchfield, start, page_len, filters)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p><span class="label label-info">Public API</span>
    <br><code>/api/method/erpnext.hr.doctype.leave_application.leave_application.get_events</code>
</p>
<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_events" href="#erpnext.hr.doctype.leave_application.leave_application.get_events" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_events</b>
    <i class="text-muted">(start, end)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_holidays" href="#erpnext.hr.doctype.leave_application.leave_application.get_holidays" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_holidays</b>
    <i class="text-muted">(employee, from_date, to_date)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_leave_allocation_records" href="#erpnext.hr.doctype.leave_application.leave_application.get_leave_allocation_records" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_leave_allocation_records</b>
    <i class="text-muted">(date, employee=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p><span class="label label-info">Public API</span>
    <br><code>/api/method/erpnext.hr.doctype.leave_application.leave_application.get_leave_balance_on</code>
</p>
<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_leave_balance_on" href="#erpnext.hr.doctype.leave_application.leave_application.get_leave_balance_on" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_leave_balance_on</b>
    <i class="text-muted">(employee, leave_type, date, allocation_records=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p><span class="label label-info">Public API</span>
    <br><code>/api/method/erpnext.hr.doctype.leave_application.leave_application.get_number_of_leave_days</code>
</p>
<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.get_number_of_leave_days" href="#erpnext.hr.doctype.leave_application.leave_application.get_number_of_leave_days" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>get_number_of_leave_days</b>
    <i class="text-muted">(employee, leave_type, from_date, to_date, half_day=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

<p class="docs-attr-name">
    <a name="erpnext.hr.doctype.leave_application.leave_application.is_lwp" href="#erpnext.hr.doctype.leave_application.leave_application.is_lwp" class="text-muted small">
        <i class="icon-link small" style="color: #ccc;"></i></a>
	erpnext.hr.doctype.leave_application.leave_application.<b>is_lwp</b>
    <i class="text-muted">(leave_type)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>

    <h4>Linked In:</h4>
    <ul>
    
		
        <li>

Leave Application

    </ul>