For me, the best is to set invisible states to True with a PYSON statement like in your first attempt.
As @fmorato said, you can not hide the all column because it depends on each row.
The fields are displayed on a tree view and I want to hide ‘idp_field’ if the ‘type’ is not ‘fuel’. With the form view it works fine, can show/hide the field, but with tree view not.
If it works within the form view, it will work with the tree view.
But you have to realize that a column can not disappear for a row and still be present for other rows.
So instead of hiding the column what happens is that its content won’t be displayed.