From d69e3eb5d79bd3276c83713c25d88e35c38f038f Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Sat, 16 May 2020 19:37:03 +0530 Subject: [PATCH] feat: use name instead of customer name to link address and contact --- .../connectors/woocommerce_connection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index 1e422db828..6d379f6ed5 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -105,7 +105,7 @@ def create_contact(data, customer): contact.append("links", { "link_doctype": "Customer", - "link_name": customer.customer_name + "link_name": customer.name }) contact.flags.ignore_mandatory = True @@ -128,7 +128,7 @@ def create_address(raw_data, customer, address_type): address.email_id = customer.woocommerce_email address.append("links", { "link_doctype": "Customer", - "link_name": customer.customer_name + "link_name": customer.name }) address.flags.ignore_mandatory = True @@ -138,7 +138,7 @@ def create_address(raw_data, customer, address_type): def rename_address(address, customer): old_address_title = address.name - new_address_title = customer.customer_name + "-" + address.address_type + new_address_title = customer.name + "-" + address.address_type address.address_title = customer.customer_name address.save()