Class Method Overriding (non-whitelisted)

Hi,

I am new to ERPNext and your valuable suggestion is required, As I’m stuck in situation how to override ERPNext core class method.

I want override get_gl_entries() method of ExpenseClaim class in expense_claim.py in my custom app,
I have made changes in ExpenseClaim DocType and I want to add some more code in get_gl_entries() method but if I’m doing it in core file it will be get updated some time with new release and my code will be removed.

Therefor I want to keep my changes in my custom app so if there is any update my code still remains

Is there any way possible to do it. Please reply asap…

Hello all…
I also looking for same…any idea to do this??

I believe is almost the same type

There is no easy way to override queries as of now. What are you trying to do? Maybe make it generic and send in a PR?

Any update? thanks in advance.