Is safe to modify python3 code in /apps/erpnext?

is safe to edit python code in apps/erpnext ?
it’s will safe if upgrate ERPnext ?


You probably don’t want to. You can likely use the override doctype class in your custom app to achieve the desired result. Override Doctype Class

Thanks for you replies ,
this is not working


I can help, but you need to be more specific than “It’s not working”.

I’m try to override get_payment_url() method located in PaymentRequest class

i follow introduction on doc ( link you sent )
So i Override like what you see in screenshot

But still call super.method ( should be overrided ) not new one !


Your class name in the override should be the “presentation” doctype name, not the class name. That will get you to the next problem at least…

override_doctype_class = {
	'PaymentRequest': # incorrect
	'Payment Request': # correct
1 Like

It’s work , Thanks

1 Like