fix: Suppier name was not taken when creating address from supplier
This commit is contained in:
parent
7842c9fba8
commit
545ef3c234
@ -677,10 +677,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"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user