How to remove my customized changes from doctype?

Hello Community,

How to remove customized changes from the doctype?

I have already click on Reset Defaults button of my doctype. But my changes are not removed from the doctype.

I want to help from your side to solve this issue.

Thank you.

In which doctype you did the changes?
check git status in your app directory and remove it using

git checkout file_path

@Sangram,

I have made the changes through site with the using of customization functionality not in direct from base code.

Then I had export the changes in my custom app.

Now I had removed that custom file from my custom app, deleted the doc fields from a site as well. But still, the changes are not reflected.

you mean you did the changes using customized form not in doctype. Then you take fixtures of it
(i.e. Property Setter and Custom Fields) right?

Which file did you delete?

Yes

I have made the change in Packing Slip doctype.

I have export the customized changes in my app. So, There is a file created with packing_slip.json name contains all my custom doc fields.

Then I want to remove my custom changes from Packing slip doctype.
So, I just removed the json file.

did you used Customized Form for it or directly in the doctype.

Incorrect way. Every doctype has it’s json file.
you can use git to maintain your changes.

Now goto frappe-bench/app/erpnext hit the git status cmd it will shows you your changes remove it using

git stash or git checkout -- .

serpentcs@serpentcs-A5:~/workspace/myprojects/erp_next/frappe-bench/apps/erpnext$ git status
On branch master
Your branch is up-to-date with ‘upstream/master’.

nothing to commit, working directory clean

There are not any changes inside erpnext app.

run

  1. bench clear-cache
  2. bench build
  3. bench migrate

from frappe-bench directory and check

Have already gone through.
But ok I am again executing this commands.

Changes are still on my site.

I have used Customized form for changes.

Check git status for your custom app as you took fixtures of it. and remove the changes as I mentioned in a previous reply.

Or run

bench export-fixtures

if you not taken and then remove property_setter.json and custom_field.json

Sorry to say but i could not understand what is fixtures in erpnext?
Can you please tell me more on same? whare it is and how to use that?

check this

https://frappe.github.io/frappe/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation

Ok thanks for give me an info about fixtures.

But in my scenario, there is no any fixtures included.

I used totally different way to make the customization in packing slip.

Is your added field visible from customized form if yes then remove it.

Did you find any solution? I am stuck as well.

@Chandresh_Thakkar In your case, resetting to defaults should work, but if that doesn’t work you have to do the following

Go to your database, all the customizations in form (not custom fields) are stored in the property setter table. So delete, unnecessary customizations

DELETE from `tabProperty Setter` where doc_type = "YOUR DOCTYPE" and field_name="YOUR FIELDNAME";

Then do bench migrate, make sure you have not exported your customization in any module, otherwise, it will not work.