Hi,
Please follow this documentation: Exporting Customizations to your App (frappeframework.com)
You need to export fixtures.
Thanks,
Divyesh Mangroliya
Hi,
Please follow this documentation: Exporting Customizations to your App (frappeframework.com)
You need to export fixtures.
Thanks,
Divyesh Mangroliya
im follow that step already, and run bench update
but customized doctype not synced to the testing-apps
. also i try to git push and pull from the testing-apps
but everything up to date, mean no file added from the bench update
Hi,
Did you run the following command for development site ?
bench --site mysite export-fixtures
Also, you need to run the following command after update
bench --site new-site migrate
Thanks,
Divyesh Mangroliya
yeah im run that already, but nothing happen on my apps
Hi,
Can you check one more thing, custom_fields.json file is created in fixtures folder and contains all the custom fields?
Thanks,
Divyesh Mangroliya
where i can find the fixtures folder ?
testing.sites.local
on the testing-apps
apps modules.
when i run bench migrates
it say syncing fixtures but still no new files added to my testing-apps
Hi,
You can find it under /frappe-bench/apps/your_app/your_app/fixtures
Also, check the content of custom_fields.json file.
Thanks,
Divyesh Mangroliya
Hi,
Also make sure you defined fixtures in hook.py as follows:
fixtures = [
{"dt": "Custom Field"},
{"dt": "Client Script"},
{"dt": "Server Script"},
]
Thanks,
Divyesh Mangroliya
i found
/frappe-bench/apps/your_app/your_app/
but no fixtures folder
just found
no fixtures folder
Hi,
Please add the fixtures code I provided in above post in hook.py and run the export-fixtures command again.
It will create fixtures folder and inside three files.
Thanks,
Divyesh Mangroliya
thanks now i see that
it contains
now how to get my customized doctype ? i need to write the doctype name one by one ?
Hi,
you intend to say “customized doctype” means you added custom fields by clicking Customize Form on Standard Doctype? or any Newly added Doctypes as part of custom app?
With the above setup both the cases should work.
Thanks,
Divyesh Mangroliya
i mean Newly added Doctypes as part of custom app.
i got it, i added it one by one on hooks.py, when i run export-fixtures
its inserted to my custom app fixtures.
is there any other way ?
Hi,
Something is not correct. If your site is in developer mode and once you add any new Doctype, system will create boilerplate code under /frappe-bench/apps/your_app/your_app/your_module/doctype
Please make sure your site is in developer mode.
Thanks,
Divyesh Mangroliya
my site_config.json have "developer_mode": 1,
do i need something to activate it ??? maybe restart bench or something ?
Hi,
I am suggesting you to have look at this free course: Library Management with Frappe Framework
This course will help you clear up all your doubts.
Thanks,
Divyesh Mangroliya
if im create doctype in production mode, i can’t add Newly added Doctypes to my custom app?
Hi,
If you create any Doctype in production mode it will not create the underlying code. All the customization is saved in the Database and persisted for that site during updates. This approach is fully used when you just need a few forms to create some data and use it without any controller methods.
If you want to export it to your custom app it is possible with the setup we have done above.
Thanks,
Divyesh Mangroliya
ah thanks, great to hear that so my created doctype is not lost