diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 90c1e3ff5424e179b7978750cb0fe85a3150c261..ea0fea2f102d4b15b7faa55004939979e17205ac 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -4,7 +4,6 @@ import frappe from frappe import _, bold, throw -from frappe.contacts.doctype.address.address import get_address_display from frappe.utils import cint, flt, get_link_to_form, nowtime from erpnext.accounts.party import render_address @@ -594,6 +593,12 @@ class SellingController(StockController): ) def set_customer_address(self): + try: + from frappe.contacts.doctype.address.address import render_address + except ImportError: + # Older frappe versions where this function is not available + from frappe.contacts.doctype.address.address import get_address_display as render_address + address_dict = { "customer_address": "address_display", "shipping_address_name": "shipping_address",