Skip to content

Commit

Permalink
fix: Suppier name was not taken when creating address from supplier
Browse files Browse the repository at this point in the history
(cherry picked from commit 545ef3c)
  • Loading branch information
kunhimohamed authored and mergify[bot] committed Nov 18, 2023
1 parent aaccfeb commit 2b94489
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/selling/doctype/customer/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,12 @@ def make_address(args, is_primary_address=1, is_shipping_address=1):
title=_("Missing Values Required"),
)

party_name_key = "customer_name" if args.doctype == "Customer" else "supplier_name"

address = frappe.get_doc(
{
"doctype": "Address",
"address_title": args.get("customer_name"),
"address_title": args.get(party_name_key),
"address_line1": args.get("address_line1"),
"address_line2": args.get("address_line2"),
"city": args.get("city"),
Expand Down

0 comments on commit 2b94489

Please sign in to comment.