Hii
Currently we can have only single Custom Script per DocType. It is fine for most of the cases.
Consider this- we extended a feature in erpnext that is a little bit big., and required by most of the customers., so instead of copying the modifications to each of the customer app, I think its best to save it as an app, so this feature can be deployed easily anywhere.
The custom scripts copied from app1 is overwritten by those from app2. This is because frappe is taking only single custom script per doctype. Currently the solution is to export customer specific code in fixtures, and manually copy paste app2’s custom script in a newline of the app1’s custom scripts, after deploying
Why didnt they do this ? development limitation ?
Or the way i am implementing the feature is wrong ?
No actually, we found an alternate method to fix this.
We grouped features into multiple apps.,
in each apps, we used doctype_js hook to plug in our own custom code just like Custom Scripts.