From b2d9ffa4cadc9756031b3687b3e7ddb2f5e0ce9f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2019 13:41:25 +0530 Subject: [PATCH] fix: To allow creation of sales invoice without customer --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 77842d0b5c7..f283506b243 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1166,6 +1166,8 @@ class SalesInvoice(SellingController): self.set_missing_values(for_validate = True) def validate_inter_company_party(doctype, party, company, inter_company_invoice_reference): + if not party: + return if doctype == "Sales Invoice": partytype, ref_partytype, internal = "Customer", "Supplier", "is_internal_customer" ref_doc = "Purchase Invoice"