ERPNext CRM Error: "Invalid filter: status" and "Invalid filter: company" after removing fields

Hi ERPNext community,
I’m encountering an error in my ERPNext CRM module after customizing it for my workflow. When accessing the CRM section, I’m getting these error messages:

Invalid filter: status
Invalid filter: company

Here’s my situation:

  • I’ve removed the ‘status’ and ‘company’ fields from my CRM DocTypes as they weren’t needed for my workflow
  • The fields are not present in my Opportunity DocType or other CRM-related DocTypes
  • I’ve verified this through the DocType settings
  • I’ve tried clearing the cache using bench clear-cache

Questions:

  1. What could be causing these filter errors even though the fields don’t exist in my DocTypes?
  2. Where else should I look to remove any lingering references to these fields?
  3. Is there a systematic way to track down where these filter references are coming from?

Any guidance on resolving this would be greatly appreciated. Thank you!

System Details:

Don’t remove the standard field, if you want to remove then hide them.
Please read the post: How to delete form custom field from the database with linux terminal in erpnext? - #8 by NCP

And Error from the “Territory Wise Sales” dashboard.