Hi, I was struggling with this, maybe someone else is also not yet familiar with this, what I did is I experimented and got to solution.
This happened to me when I changed module and archived a field that was a selection type and changed it to Many2one. There was still users that had their default filter using the archived field and when they opened the tree view of the model they had error saying (more less):
... ValueError: Invalid field 'my_selection_field' on model 'my.custom.model'