Best approach to edit ERPNext python doctypes

You gave me a good idea but the thing is that it could not override.
So I modified a little bit by following these instructions:

Thank you for the help.