In my view, you could take an initiative differentiated.
Already have some time I've been thinking about, links instead of custom code to be part of the native code, why not leave it out in another file, eg "my_doctype.custom.js"
That extends through the object ClientScriptApi cscript, with custom methods.
I say this not only because of JS code, but python code too.
It's funny, when I want to encode new functionalities in my fork, I can not keep the updates current, only when I finish, I apply the same and check what has changed, and I review my code.
If there is an API for customization, this would leave the thing and leaner, I say this because, I do not even need to keep a fork full ERPNext, and Wnframework, but only the files *. Custom. *
If you consider that a simple "my_doctype_custom from import *" in python code already solve most issues callback.
In the javascript this separation would also be advantageous.
Even before I had my codes as Custom Code (Client and Server)
But for reasons of performance, we are migrating everything to the server side, but in counterpart, created problems with Git merge.
See, we're working on 4 features simultaneously to meet Brazilian law, for us, it would be more practical to just keep our code, and leave it up to you to manage the core application, but due to the current model of Development also, we we must actively participate in the changes in the nucleus, even in our local repositories.
Recently I even proposed a hack with setTimeout, because there is a problem with get_query, and still keep this hack on my fork, why the code does not run in my application.
I'm sure two points:
My repository is as up to date as yours
I have no customization on "customer_address" which is where the error is caused.
So that's it, just let my humble comments on this issue.