From e93150bf264a17b573ab8b02b61f77bc8684c659 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 18 Dec 2012 10:33:04 +0530 Subject: [PATCH] sales order linked with project --- selling/doctype/sales_order/sales_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py index 9d23565d87..f024efc2a8 100644 --- a/selling/doctype/sales_order/sales_order.py +++ b/selling/doctype/sales_order/sales_order.py @@ -59,7 +59,7 @@ class DocType(TransactionBase): #------------------------- def pull_project_customer(self): res = sql("select customer from `tabProject` where name = '%s'"%self.doc.project_name) - if res: + if res and res[0][0]: get_obj('DocType Mapper', 'Project-Sales Order').dt_map('Project', 'Sales Order', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Sales Order']]")