From eef0f453d25f8ca0419cafd71fe4a86da947de2d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 08:48:52 +0530 Subject: [PATCH] fix: Return against internal purchase invoice (#33635) fix: Return against internal purchase invoice (#33635) (cherry picked from commit 906ad10d16d2d154cb230b0b0f3fab3d12a35701) Co-authored-by: Deepesh Garg --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 74f6b6542e5..ef12483baac 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -383,7 +383,7 @@ class AccountsController(TransactionBase): self.get("inter_company_reference") or self.get("inter_company_invoice_reference") or self.get("inter_company_order_reference") - ): + ) and not self.get("is_return"): msg = _("Internal Sale or Delivery Reference missing.") msg += _("Please create purchase from internal sale or delivery document itself") frappe.throw(msg, title=_("Internal Sales Reference Missing"))