Browse Source

Merge pull request #1450 from jevonearth/app-custom-fileds

Clarify that Custom Fields can be created on
version-14
Pratik Vyas 9 years ago
parent
commit
3ccb3fe2ec
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md

frappe/docs/user/guides/app_development/how-to-add-customizations-to-app.md → frappe/docs/user/guides/app_development/how-to-create-custom-fields-during-app-installation.md View File

@@ -1,4 +1,6 @@
If you want to add **Custom Fields** to your app so that they are automatically created when you app is installed on a new site, you will have to add them as **Fixtures** in the `hooks.py` file of your app.
Your custom app can automatically add **Custom Fields** to DocTypes outside of your app when it is installed to a new site.

To do this, add the new custom fields that your app requires, using the Frappe web application.


In your `hooks.py` file, add `"Custom Fields"` In your `hooks.py` file, add `"Custom Fields"`


@@ -8,11 +10,11 @@ Export fixtures before you commit your app with:


$ bench --site mysite export-fixtures $ bench --site mysite export-fixtures


This will create a new folder called `fixtures` in your app folder and a `.csv` or `.json` file will be created with the custom fields.
This will create a new folder called `fixtures` in your app folder and a `.csv` or `.json` file will be created with the definition of the custom fields you added.


This file will be automatically imported when the app is installed in a new site or updated via `bench update`. This file will be automatically imported when the app is installed in a new site or updated via `bench update`.


Note: You can also add single DocTypes like "Website Settings" as fixtures Note: You can also add single DocTypes like "Website Settings" as fixtures




<!-- markdown -->
<!-- markdown -->

Loading…
Cancel
Save