Custom Frappe Apps

I’m managing two sites (Site A and Site B) within a single Frappe bench. Site A requires modifications to the user or role doctype, but these changes are not necessary for Site B. How can I ensure that changes made to the user/role doctype in Site A don’t affect Site B, regardless of whether the bench migrate command is executed?

Hi @Nyuuk:

Apps are shared for all sites of the bench … So changes on apps will affect to all the sites with this app installed on. You can try customization instead, but is not always easy with core doctypes… or thinking about two different benches …

Hope this helps.

What do you mean about customization? can you explain with simple case?

Hi @Nyuuk:

I mean customize form

https://frappeframework.com/docs/user/en/basics/doctypes/customize

This generates custom fields and property setters, that will be stored on database, so just affects to that particular site.

Depending on the changes you’d want it will be more or less tricky … The main blocker is that you can’t add (directly) fields to a core doctype (like users or roles), but can set properties (i.e. hide fields, change default values …). Explore how property setter doctype works.

Adding custom fields is a little bit harder, because framework restricts this to non core doctypes … but a little change on custom_field.js or model.js works as a workaround.

Note: this is an “unsupported” way. Drive with care. :wink:
Hope this helps.