[Fixes] Address and Contact fixes

This commit is contained in:
mbauskar
2017-01-20 18:26:40 +05:30
parent 8271b4c564
commit 83f4780f74
6 changed files with 23 additions and 59 deletions

View File

@@ -28,15 +28,6 @@ class SalesPartner(WebsiteGenerator):
if self.partner_website and not self.partner_website.startswith("http"):
self.partner_website = "http://" + self.partner_website
def get_contacts(self, nm):
if nm:
return frappe.db.convert_to_lists(frappe.db.sql("""
select name, CONCAT(IFNULL(first_name,''),
' ',IFNULL(last_name,'')),contact_no,email_id
from `tabContact` where sales_partner = %s""", nm))
else:
return ''
def get_context(self, context):
address = frappe.db.get_value("Address",
{"sales_partner": self.name, "is_primary_address": 1},