hooks fixes

This commit is contained in:
Rushabh Mehta
2014-02-05 17:04:49 +05:30
parent cc008cc109
commit 307fac8b78
4 changed files with 22 additions and 23 deletions

View File

@@ -16,11 +16,10 @@ class DocType:
self.doclist = doclist
def get_project_details(self):
cust = webnotes.conn.sql("select customer, customer_name from `tabProject` where name = %s", self.doc.project)
if cust:
ret = {'customer': cust and cust[0][0] or '', 'customer_name': cust and cust[0][1] or ''}
return ret
return {
"project": self.doc.project
}
def get_customer_details(self):
cust = webnotes.conn.sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer)
if cust: