"Account is required" when creating Asset or Purchase Invoice

I’m trying to create a fixed asset belonging to a secondary company in ERPNext, and I keep receiving a message that “Account is required”:

There is a purchase receipt in the system for the item. I get this error when I try to create the asset itself, or a purchase invoice corresponding to the asset.

I can’t for the life of me work out what it means by this. I’ve added an expense account to the item on the purchase invoice, added defaults for accounts to the item category and the item itself, and made sure the company has default accounts for all things depreciation etc.

How do I go about finding where the account is missing and filling it in? How do I figure out what this error message even means?

Which version of ERPNext is this occurring in?

Also share the steps you’re following to create a new Asset. Make sure that you’ve also selected the correct accounts in the Asset Category.

When the error occurs, check the browser’s console for a corresponding traceback. That along with the rest of the information should allow community members to assist you in solving the issue and determine if this is a bug or a configuration related issue.

Had the same problem, you need to setup the accounts in Asset → Asset Category → Accounts