Override standard controller methods in erpnext with custom app like (calculate_contribution method in selling controller)
In your custom app custom_app/custom_app/__int__.py
file
For Example
from erpnext.controllers.taxes_and_totals import calculate_taxes_and_totals
from custom_app...<path_to_file> import calculate_item_values
calculate_taxes_and_totals.calculate_item_values = calculate_item_values
@jamsheer Hello brother, I’ve tried to add the first line(from erpnext.controllers…) that you’ve mentioned. But I don’t know how to set path for the custom path? What is that custom path means(from custom_app…<path_to_file> import )? Could you please elaborate this?
Thanks in advance!!!
Custom app means the frappe app that you created
That worked, thanks
This article helped me
@jamsheer hello brother, if that is overriding the py file, do i need to also override the js/controllers/taxes_and_totals.js?