class YourDocTypeName(Document):
def __init__(self):
self.mydata = "Hello"
No Need to add in customize js file.
if you any change in js file that doesn’t get print or PDF, because print or PDF receive ‘doc’ object from direct your DocType class not from js.
#Otherwise
you need to set value from your custom javascript and need to “Save Doc”
like cur_frm.save()