What is "Module (for export)" In Client Script And Server Script

I couldn’t understand why that field is there also couln’t find related document.

is there anyone know? how to use it?

Hi:

This field lets you include your script in a custom app and make this app “portable” and installable in other sites. It’s the same way to include custom fields, doctypes, reports, etc …

Hope this helps.

I am using it but no changes in my app code,

Is there any command to export this to my app or automatically it will save in my app?

if it will save in app where it will save

Take a look here. Objects like client/server scripts are really “data” on doctypes.

Use hooks.py to set the fixtures you want to export. In your case, client script. The module is the filter:

fixtures = [{"doctype": "Client Script", "filters": [["module" , "in" , ("yourmodule" )]]}]

Then run bench export-fixtures . This will create a folder called “Fixtures” on your app directory. Inside you can find a json file with the script content.

Hope this helps.

1 Like

Ok thank you,

However we can use fixtures without “Module (For Export)” Also. I thought like while creating doctype it will be saved automatically saved as json in respective app and module folder

1 Like