Custom doctype not showing after install my custom app

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

Can you guide me please

Run bench migrate command for site then reload the site and check
Run also clear cache command for the site.

I do it but nothing change
Here photo for migtate
My custom app name is firstapp.

Here photo for doctype

Here photo for App folder the doctype folder is missing

I think the doctype folder should be in this path

Is it important to create the doctype from terminal ?

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

  1. Open the hooks.py file in your custom app.

  2. Specify the configurations or customizations you want to export. For example:

    fixtures = [
        {"doctype": "Custom Field"},
        {"doctype": "Property Setter"},
        {"doctype": "Custom Script"},
        {"doctype": "Your Custom Doctype"}
    ]
    
    
  3. Run the following command to export the fixtures for the site:

bench --site [site_name] export-fixtures
  1. Once the command is executed, JSON files will be generated in the codebase, typically in the fixtures folder of your app.
  2. 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.

1 Like

Hi @nirav thank for your help
But still not work
Is fixtures for move doctpe or for move just the data inside doctype

For me I have an customize app called firstapp inside it I add one doctype called Cars inside cars I have two fields Name and photo

I try the fixtures as

Fixture=[

      "Cars"

]

Also I try

Fixtures =[
      {"Doctype": "Cars"}
]

After that I export the fixtures

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

try this for taking doctype

fixtures = [
    {"dt": "DocType", "filters": [["name", "=", "Cars"]]}
]
1 Like

Thank you very much
Thats work good