when i try to save or submit a doctype using server script from another doctype, i get 500 error.
i have a doctype called ‘Payment’. In my payment.py, i have
from new_app.new_app.doctype.application.application import update_payment
class Payment(Document):
def validate(self):
...... (other line of codes and conditions)
def make_payment(docname,amount):
........
if req_amount==paid_amount:
update_payment(docname,amount)
What do your log files show as the cause of the error.
Do you have NGinx in front of ERPNext? 500 Errors arise from the proxy server. I don’t think ERPNext emits them.
Meanwhile … does your DocType “Application” actually exist? Is docname actually naming something that exists? Does it have a child table called payment?
hmm… that’s a good idea… i dint use bench console much earlier… i can now see that there is an error in another function which is part of validate. let me correct it and update here.