Field marked as hidden in DocType and pushed to Git, but still visible in the UI

I have set a field as hidden (hidden = 1) in the DocType and pushed the changes to Git. The field is also marked as hidden in the database. However, it is still visible in the UI. What could be causing this, and how can I resolve it?

Pushed to Git.. as a fork? or are you developing a custom app? Do you have developer mode on? Did you try migrating? Clearing cache?

Thanks for your response.

I am developing a custom app and the changes were pushed to my own Git repository (not a fork).

Yes, Developer Mode is enabled.

After pulling the changes to the server, I tried the following:

run bench migrate

run bench clear-cache

run bench build

Even now the field is marked as hidden = 1 in the DocType (and in the database), but it is still visible in the UI.

This looks like ERPNext -‘s Sales Invoice doctype and not related to your custom app. I think the correct way is to use “Customize Form” then from the same customize form click on Export customizations to App. This will export customizations as fixtures in your app.