mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
Merge branch 'wsgi' of https://github.com/webnotes/erpnext into i18n
Conflicts: accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js public/js/complete_setup.js selling/doctype/opportunity/opportunity.js selling/doctype/quotation/quotation.js
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
wn.provide("erpnext.hr");
|
||||
erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
this.setup_leave_approver_select();
|
||||
this.frm.fields_dict.user_id.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"core.doctype.profile.profile.profile_query"} }
|
||||
this.frm.fields_dict.reports_to.get_query = function(doc,cdt,cdn) {
|
||||
@@ -12,6 +11,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
this.setup_leave_approver_select();
|
||||
this.frm.toggle_display(["esic_card_no", "gratuity_lic_id", "pan_number", "pf_number"],
|
||||
wn.control_panel.country==="India");
|
||||
if(this.frm.doc.__islocal) this.frm.set_value("employee_name", "");
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import getdate, validate_email_add, cstr
|
||||
from webnotes.utils import getdate, validate_email_add, cstr, cint
|
||||
from webnotes.model.doc import make_autoname
|
||||
from webnotes import msgprint, _
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
class DocType:
|
||||
def __init__(self,doc,doclist=[]):
|
||||
@@ -40,12 +39,12 @@ class DocType:
|
||||
self.validate_email()
|
||||
self.validate_status()
|
||||
self.validate_employee_leave_approver()
|
||||
self.update_dob_event()
|
||||
|
||||
def on_update(self):
|
||||
if self.doc.user_id:
|
||||
self.update_user_default()
|
||||
self.update_profile()
|
||||
self.update_dob_event()
|
||||
|
||||
def update_user_default(self):
|
||||
webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id)
|
||||
@@ -156,10 +155,11 @@ class DocType:
|
||||
raise_exception=InvalidLeaveApproverError)
|
||||
|
||||
def update_dob_event(self):
|
||||
if self.doc.status == "Active" and self.doc.date_of_birth:
|
||||
if self.doc.status == "Active" and self.doc.date_of_birth \
|
||||
and not cint(webnotes.conn.get_value("HR Settings", None, "stop_birthday_reminders")):
|
||||
birthday_event = webnotes.conn.sql("""select name from `tabEvent` where repeat_on='Every Year'
|
||||
and ref_type='Employee' and ref_name=%s""", self.doc.name)
|
||||
|
||||
|
||||
starts_on = self.doc.date_of_birth + " 00:00:00"
|
||||
ends_on = self.doc.date_of_birth + " 00:15:00"
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
{
|
||||
"creation": "2013-03-07 09:04:18",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-08 14:22:11",
|
||||
"modified": "2013-10-11 10:52:53",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_attach": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "naming_series:",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
|
||||
Reference in New Issue
Block a user