I am working on bug fixing/enhancement on develop branch. I would like to do a pull request.
Beside .py , my work includes changes to existing doctype. Ex. I have added a new check box field to customer doctype.
When i do a $ git status. It shows changes done on .py but doesn’t reflect changes done on existing doctype.
My understanding is when i add new field to existing doctype ex customer. It is a db level change, so how to do propagate this changes to my fork and ultimately a pull request.
Note, developer_mode is enabled.
Please guide. thanks
When i create new doctype, git status shows the changes
But for existing doctype when new field is added. git status shows no change. Also i checked customer.json the new field is not there. If i check on mysql desc tabCustomer new field is there. When i create a new customer the new field is there
Note sure, what could be wrong?!
Thanks for contributing! I had the same experience… eventually had to edit the .json files directly which is more cumbersome. Hopefully it gets fixed soon but in the meantime you could consider editing the .json file
Don’t mind, let me ask the basic. Are you adding the new field from Customize Form? In that case it will not affect json file. You need to add the field directly in the doctype.
Hi nabin,
I guess you nailed it. Yes i am adding new field to customize form ( in effect adding a field to tabCustomer).
So i guess in spite of developer_mode set, it would not update json.
Solution : You have set developer_mode : 1. You are adding a new field to existing doctype via customize form. You expect doctype json to have the new the field added. But it will not. So workaround is to update json manually.
Hi Nabin
Happy Diwali and New year!!
json doesn’t get updated. all recommended steps are done
1)set developer_mode : 1
2)bench --site sitename clear-cache
3)Did customize form with admin login
It is finally working for me. Final steps
Task : Want to add new field to existing doctype. Ex want to add a check box in customer doctype
Solution :
1)set developer_mode : 1
2)bench --site sitename clear-cache
3)Use admin login
4) Go to Explore–>Developer–>Doctype–>Click on doctype you want to modify(ex customer)
5)Once the doctype opens, click Add row and add new field. Save it
6) Do git status. It shows json is modified
modified: erpnext/selling/doctype/customer/customer.json
Thanks nabin / abdulla and rushab for all the help @wale above steps should help you.