Hi all,
I have migrated from V14 to V15 and made few changes due to the migration but only now i have seen that override_doctype_class is not working…
I had to use this link way
Override whitelist method and class method for the same class - Frappe Framework / Customization - Frappe Forum
1 Like
Using the link i shared does not solve all… Because if you have more than one function changed you will have to list them all… and still some errors…
After searching a bit i found that the Doctypes i made changes (Sales Invoice and Payment Request) on V13 because erpnext was single application the Override was working well…
Now on Version 15 i share the Override with two other applications as you can see:
For SALES INVOICE:
[‘angola_erp.overrides.customsales_invoice.CustomSalesInvoice’,
‘healthcare.healthcare.custom_doctype.sales_invoice.HealthcareSalesInvoice’]
For PAYMENT REQUEST:
[‘angola_erp.overrides.custompayment_request.CustomPaymentRequest’, ‘webshop.webshop.doctype.override_doctype.payment_request.PaymentRequest’]
I also see that the in base_document.py where CLASS_OVERRIDES occurs it will only get the LAST reason why on my Custom Application stopped working and only works on WEBSHOP and HEALHCARE…
class_overrides = frappe.get_hooks(“override_doctype_class”)
if class_overrides and class_overrides.get(doctype):
import_path = class_overrides[doctype][-1]
module_path, classname = import_path.rsplit(“.”, 1)
module = frappe.get_module(module_path)
Would be good to load all.