How to add custom field in standard app of erpnext from a custom app through CODE

Hi there

How can we add custom fields in a standard app, i found two option

  1. From Frontend.
  2. Adding [custom field] in hooks.py. ( even it is not clear that how it will added )

but i want to add fields from custom app, so i will just install app and fields will automatically added to that target model ( Doctype)

and i think there must be very simple for this, not above mentioned two option. it is not good way to do so. @rmehta , if im not wrong

Thanks in advance

@Sandeep Clearly you haven’t carefully read the documents. Both ways are for different use cases.

If you are customizing form to add few fields to existing standard document, then front-end based method is de facto way of doing it for regular users.

The Other one is useful for developers or advanced users, to customize behaviour programmatically.

Note: Kindly follow the posting guidelines before posting here. Thanks

@yashodhan

May i know why you added this Note section, i don’t know why if anyone ask something here people reply with this kind of text.

It will great if you please tell me where is the doc for that we do it pragmatically, instead of adding such text.

I think, feedback always good not for taking that in a different way.

waiting for your message regarding documents that how to add custom field through code for a developer and it will help all other as well.

Thanks

Man, I mean at least we must use concept like inheritance for this kind of thing.

Thanks Man… give community is clearer thing not where people confused. and at least if you don’t have answer for the question you must not react on the post, so at least someone can.

I don’t you, how do you understand.

@Sandeep

Apart from english that I am not familiar with, it is about quality of the forum. For instance you asked 2h ago and expect instant reply. On this matter @yashodhan is 100% right and I am thinking twice before tagging people which are busy developing FOR US.

If I cannot find something in the docs (which I believe you read, before asking questions) I go for the source code to see how developers do this (you are 8+ years python pro - so I believe u can handle reading code?)

Let’s respect each others and carry on :slight_smile:

Fixtures does exactly that.

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

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

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.