Modifying standard doc

Hi All ,

I am trying to modify a standard doc, I am on v7 beta should I wait till the stable version is released ? I modified the standard doc when I was on v6.27 and when updated to v7 beta , all my customization were gone inspite of running git add . command. Please guide me

Thanks in advance

@srinivasragav did you commit the changes ?

1 Like

@neilLasrado Yes I did . Now I am afraid if I commit some changes and update will the apps which are committed gets updated or not ?

As you have upgraded to version 7, you are now in “develop” branch. Previously in version 6, you were using branch “master”. So, all you commits are in master branch only and they are not available in develop branch.

By the way, committing any customizaton related code in frappe and erpnext repo is not recommended. Instead you should always write customized code in a separate app and commit there. That way your customization will always remain safe and will not cause any conflict with frappe/erpnext upgrade.

1 Like

To create a new app check following links:

https://frappe.github.io/frappe/user/en/tutorial/new-app.html

2 Likes

Many thanks for responding @nabinhait ,

I know it is not recommended to customize the standard app , but I am forced to modify the item master , if product is selected some fields would appear and if raw material is selected some other fields. As item module is already linked with other docs I thought it would be easy to customize that . I could now see the data in the database , but the fields disappeared. Is there a way I could bring those fields back without manually creating it again ?

If you had added custom fields, those should remain intact with version upgrade.

What type of customizations you had done and how? Have you written any code to set dependency of the fields?

1 Like

Yes , I added custom fields to the item master , I did not have any scripts running . No dependency for the fields. But it is not appearing

Check customize form, if those fields has been moved to any hidden / collapsible section.

1 Like

Thanks for responding sir , I checked it was not there , I had to create all the 95 fields manually , I did for now but again when v7 gets released by the end of this month I need to update , I am afraid git add . is not helping me. What should I do that time ?

Thanks in advance

Custom Fields should not be affected by the v7 update irrespective of you did “git add” or not.

How did you update from v6 to v7?

1 Like

Many thanks for your reply , No when I migrated from v6 to v7 beta this did not happen . I did bench update when I was in beta v7 to fix that letter head bug , and my custom fields disappeared . Now I created again no issues , but please guide me , I will do bench update again when v7 gets released that time will my custom fields disappear again ?

Thanks in advance

There is no reason your custom fields will be deleted with the bench update. You should investigate why it has been deleted. No one has reported such issues, something you must doing wrong.

1 Like

@nabinhait . Yes Sir I am a novice so somewhere I must be wrong , but the custom fields I created inside my custom apps remains intact only if I customize a standard module I am facing issues, could you please guide me with exact commands on how to do bench update

Thanks in advance

It is not about bench update. It is about how you are creating custom field. Are you adding custom field directly in doctype? In that case, there is chance to be deleted and it is not the correct way. You should create custom fields via Setup -> Custom Field.

As Custom Fields stored in database, it is not related to git commands and should not affected with bench update.

2 Likes

@nabinhait . Thanks for the info Sir , I was creating custom fields inside developer -> doctype edit . I understood . Many thanks for educating me. This can be closed . Thanks again