When I install my custom app t new site how can I also install the data, that is some records should be created as we get in erpnext?
You can export then as fixtures!
There is not much explanation and I have to add data to an existing doctype for example I need that when I install my app there should be a new record in “leave type” doctype. How can this be done with fixtures?
Get fixtures for that doctype! So while installing app on another site system will create those records.
Can you give an example as to how? Because there is nothing that I can understand from the link above
- Goto hooks.py in your app
- Add key fixtures in hooks.py
fixtures = ["DOCUMENT_NAME"]
- Save the file
- Goto console
bench --site your_site export-fixtures
Working, Thankyou so much