changes as per review

This commit is contained in:
Manas Solanki 2017-07-11 11:10:14 +05:30
parent cdba021802
commit 1a0536bff4

View File

@ -5,10 +5,10 @@ from __future__ import unicode_literals
import frappe
def execute():
# new field address_html is created in place of address field for the company's address
# patch for moving the address details in the address doc
# new field address_html is created in place of address field for the company's address in PR #8754 (without patch)
# so here is the patch for moving the address details in the address doc
company_list = []
if frappe.db.sql("SHOW COLUMNS FROM `tabCompany` LIKE 'address'"):
if 'address' in frappe.db.get_table_columns('Company'):
company_list = frappe.db.sql('''select name, address from `tabCompany` where address is not null''', as_dict=1)
for company in company_list:
@ -24,7 +24,6 @@ def execute():
"doctype":"Address",
"address_line1": add_list[0],
"city": add_list[2],
"is_your_company_address":1,
"links": [{
"link_doctype": "Company",
"link_name": company.name