added time log batch

This commit is contained in:
Rushabh Mehta
2013-02-28 18:42:46 +05:30
parent b0486b9d33
commit b21eb9ac09
162 changed files with 324 additions and 1658 deletions

View File

@@ -21,7 +21,10 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.timesheet_date) set_multiple(cdt,cdn,{timesheet_date:get_today()});
}
cur_frm.cscript.refresh = function(doc,cdt,cdn){}
cur_frm.cscript.refresh = function(doc,cdt,cdn){
cur_frm.set_intro("Timesheets will soon be removed. Please create a new Time Log. To create \
a new Time Log, to to Projects > Time Log > New Time Log. This will be removed in a few days.")
}
cur_frm.fields_dict['timesheet_details'].grid.get_field("project_name").get_query = function(doc,cdt,cdn){

View File

@@ -51,6 +51,8 @@ class DocType:
return time.strptime(timestr, format)
def validate(self):
msgprint("Please create a new Time Log", raise_exception=True)
if getdate(self.doc.timesheet_date) > getdate(nowdate()):
msgprint("You can not prepare timesheet for future date")
raise Exception