Hello ,
I create a simple custom app in my VM site
After that I enter to the VM erpnext site and create doctype under the custom app
Now to install my custom app in other erpnext site
I take a copy of my custom app files from my VM from Apps folder path
And I upload the folder of app to repository in githup
After that i install it in diffrent site it installed susccefully
But the doctype that I was created in my custom app not found in the new site after install the app
Exporting Customizations and Custom Doctypes in Frappe/ERPNext
To transfer all customizations and custom doctypes created in a custom app, you can use the Export Fixture feature. Here’s how you can do it step by step:
Using Export Fixture
Open the hooks.py file in your custom app.
Specify the configurations or customizations you want to export. For example:
Run the following command to export the fixtures for the site:
bench --site [site_name] export-fixtures
Once the command is executed, JSON files will be generated in the codebase, typically in the fixtures folder of your app.
Commit and push the changes to your GitHub repository:
Common Issue: “Custom” Option Enabled for Non-Administrator Users
By default, the Custom option is enabled for non-Administrator users. This can cause issues because the doctypes or customizations are stored as custom records in the database, rather than directly in the code.
Solution 1: Disable the “Custom” Option
Log in as the Administrator user.
Ensure the Custom option is disabled for the doctypes or fields you create.
When you save the doctypes, they will be directly stored in the code, allowing you to push them to Git and reuse them across any site.
Solution 2: Use Export Fixtures
If you are not using the Administrator account and the Custom option is enabled, you can still export customizations using the export fixture process as described above.
By following these steps, you can ensure that all your customizations and doctypes are properly version-controlled and reusable across different sites.
When I installed it in other frappe site
It give me this error
Error in query:
('SELECT `modified` FROM `tabCars` WHERE `name`=%(param1)s ORDER BY `modified` DESC LIMIT 1', {'param1': 'gkidnjk536'})
Skipping fixture syncing from the file cars.json. Reason: Module import failed for Cars, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.cars'
Updating Dashboard for firstapp
This trying just to move the data it dose not move the doctype design