i wondering how i can use hooks to call method on another app ,let say i want to edit hooks.py in erpnext when validate sales order i want to call my validate fucntion that has in my new app let said that costing
there is no example in hooks.py so i confused how i can do this, all function called is under erpnext apps
Thanks, ill try it, anyway for better understanding what was the variable that passed on hooks function , i see there is doc and method , what was doc value and method value?
Hi, is there any documentation to show us list of documentation ?..
im tried to add before_cancel but its not called…
doc_events = {
“Journal Voucher”: {
“on_submit”: “accounting_addons.giro.doctype.giro.giro.on_jv_update”,
“before_cancel”: “accounting_addons.giro.doctype.giro.giro.on_trash_jv”
}
}
and here my fucntion
def on_trash_jv(doc,method):
frappe.throw(“”" on thrash called “”")
From there what i do is looks alright…because the on_sumbit functionis called,but why the before_cancel is not called ?
is there anyway to trace it ? or do you know why?