Add Field to a Customized DocType for each site

What would be the best practice to add a field that is unique to each site in erpnext?

example:

site1 ( aaa.example.com)

DocType: Enrollees
Field to be Added:

Mother’s Name => Data
Mother’s Phone Number => Data

site2 ( bbbb.example.com)

DocType: Enrollees
Field to be Added:

Blood Type => Data
Height => Data
Weight => Data

Would it wise just add directly field to the setup -> doctype -> Enrollees ? or there is a better solutions for this?

@ccfiel if you have your app installed on both site, then you can make use of export fixture to add field in both sites.

You can also use data import tool to import custom fields.

@kolate_sambhaji yes I have an app but if I used customize field and export fixtures it will be available to the two sites. Which I do not want. Each sites was different fields to be added.

@ccfiel then you need to add fields separately in both sites.

@kolate_sambhaji thanks! I think that is also what is done in erpnext cloud

@ccfiel
When I do export-fixtures then it shows following message

ubuntu@sbk:~/frappe-bench$ bench export-fixtures
Exporting Web Form app erpnext filters None
Exporting Custom Field app sbk_app filters None
Exporting Property Setter app sbk_app filters None
Exporting Custom Script app sbk_app filters None

Do you know what is filters in above message?
I think we need app specific custom fields.

I did not notice in my end :slight_smile: maybe you have an app called filters? just a guess

I do not have filter app.
I have written fixtures in two app.

@ccfiel, @kolate_sambhaji

You can apply the filters on fixtures like fixtures = [{‘doctype’: ‘Sales Order’, ‘filters’: [{‘customer’: ‘Rohit’}]}]
At the time of import you have to specify the site like bench --site site_name migrate

Thanks, Rohit

2 Likes

Nice! New learning

1 Like