diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 06d5b341aef..c25d0c2410d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -483,16 +483,6 @@ class PurchaseInvoice(BuyingController): if self.update_stock and item.warehouse and (not item.from_warehouse): _inv_dict = self.get_inventory_account_dict(item, inventory_account_map) - if for_validate and item.expense_account and item.expense_account != _inv_dict["account"]: - msg = _( - "Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account" - ).format( - item.idx, - frappe.bold(_inv_dict["account"]), - frappe.bold(item.expense_account), - frappe.bold(item.warehouse), - ) - frappe.msgprint(msg, title=_("Expense Head Changed")) item.expense_account = _inv_dict["account"] else: # check if 'Stock Received But Not Billed' account is credited in Purchase receipt or not