mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fixed maintenance schedule
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
wn.provide("erpnext.hr");
|
||||
erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
this.frm.fields_dict.user_id.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"webnotes.core.doctype.profile.profile.profile_query"} }
|
||||
this.frm.fields_dict.reports_to.get_query = function(doc,cdt,cdn) {
|
||||
return{ query: "erpnext.controllers.queries.employee_query"} }
|
||||
this.frm.fields_dict.user_id.get_query = function(doc, cdt, cdn) {
|
||||
return { query:"webnotes.core.doctype.profile.profile.profile_query"} }
|
||||
this.frm.fields_dict.reports_to.get_query = function(doc, cdt, cdn) {
|
||||
return { query: "erpnext.controllers.queries.employee_query"} }
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
@@ -93,4 +93,4 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
|
||||
});
|
||||
},
|
||||
});
|
||||
cur_frm.cscript = new erpnext.hr.EmployeeController({frm: cur_frm});
|
||||
cur_frm.cscript = new erpnext.hr.EmployeeController({frm: cur_frm});
|
||||
|
||||
@@ -8,9 +8,7 @@ from webnotes.utils import add_days, add_years, cint, getdate
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import addchild, make_autoname
|
||||
from webnotes.model.bean import copy_doclist
|
||||
from webnotes import msgprint
|
||||
|
||||
|
||||
from webnotes import msgprint, throw, _
|
||||
import datetime
|
||||
|
||||
class DocType:
|
||||
@@ -19,7 +17,7 @@ class DocType:
|
||||
self.doclist = doclist
|
||||
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname(self.doc.fiscal_year +"/"+ self.doc.holiday_list_name+"/.###")
|
||||
self.doc.name = make_autoname(self.doc.fiscal_year + "/" + self.doc.holiday_list_name + "/.###")
|
||||
|
||||
def validate(self):
|
||||
self.update_default_holiday_list()
|
||||
@@ -38,11 +36,9 @@ class DocType:
|
||||
|
||||
def validate_values(self):
|
||||
if not self.doc.fiscal_year:
|
||||
msgprint("Please select Fiscal Year")
|
||||
raise Exception
|
||||
throw(_("Please select Fiscal Year"))
|
||||
if not self.doc.weekly_off:
|
||||
msgprint("Please select weekly off day")
|
||||
raise Exception
|
||||
throw(_("Please select weekly off day"))
|
||||
|
||||
def get_fy_start_end_dates(self):
|
||||
return webnotes.conn.sql("""select year_start_date, year_end_date
|
||||
|
||||
Reference in New Issue
Block a user