ccfiel
April 14, 2016, 6:29am
1
What would be the best practice to add a field that is unique to each site in erpnext?
example:
DocType: Enrollees
Field to be Added:
Mother’s Name => Data
Mother’s Phone Number => Data
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.
ccfiel
April 14, 2016, 6:59am
3
@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.
ccfiel
April 14, 2016, 7:23am
5
@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.
ccfiel
April 14, 2016, 7:35am
7
I did not notice in my end 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