[cleanup] Maintenance Schedule, Maintenance Visit

This commit is contained in:
Rushabh Mehta
2013-07-10 13:06:14 +05:30
parent f9404ba89f
commit 919b9fcccf
11 changed files with 195 additions and 303 deletions

View File

@@ -32,4 +32,13 @@ class DocType(DocTypeNestedSet):
for d in getlist(self.doclist, 'target_details'):
if not flt(d.target_qty) and not flt(d.target_amount):
webnotes.msgprint("Either target qty or target amount is mandatory.")
raise Exception
raise Exception
def get_email_id(self):
profile = webnotes.conn.get_value("Employee", self.doc.employee, "user_id")
if not profile:
webnotes.msgprint("User ID (Profile) no set for Employee %s" % self.doc.employee,
raise_exception=True)
else:
return webnotes.conn.get_value("Profile", profile, "email") or profile

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
"modified": "2013-07-05 14:54:33",
"modified": "2013-07-10 12:51:58",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -44,12 +44,10 @@
},
{
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"read_only": 1
"fieldname": "name_and_employee_id",
"fieldtype": "Section Break",
"label": "Name and Employee ID",
"options": "icon-user"
},
{
"doctype": "DocField",
@@ -93,7 +91,8 @@
"fieldname": "employee",
"fieldtype": "Link",
"label": "Employee",
"options": "Employee"
"options": "Employee",
"reqd": 1
},
{
"doctype": "DocField",
@@ -138,7 +137,8 @@
"fieldname": "target_details_section_break",
"fieldtype": "Section Break",
"label": "Sales Person Targets",
"oldfieldtype": "Section Break"
"oldfieldtype": "Section Break",
"options": "icon-bullseye"
},
{
"doctype": "DocField",