Should a new Server/Client Script in a code change in source control?

I’m adding a new DocType to a custom module “Acc Client”.
This is visible in the code/file structure.

But when I add a Server or Client Script, this does not result in a code change.
The Module is filled in with the correct module.

I thought that this was the way to deploy scripts from dev to production, or how should this be done otherwise?

Thanks,

Hi @jornevl:

Client/Server script are stored into database (site). You can include your scripts into a custom app.
Check this

Hope this helps.

So, do I need to do bench build and migrate?
Or create a fixture?

Hi @jornevl:

  • Create a custom app, install it on your site.
  • Add client/server script to new module (your new custom app will appears as a module)
  • Create fixtures on your custom app hooks.py
  • Use bench export-fixtures . It will write files to disk
  • Custom app installation process & bench migrate will deploy your scripts on new site.

Reference:
https://frappeframework.com/docs/user/en/tutorial/create-an-app
https://frappeframework.com/docs/user/en/python-api/hooks#fixtures

Hope this helps.

2 Likes