My doc_events in hooks.py has the following data
doc_events = {
"Loan": {
"on_update": "myapp.api.test.test_hook2"
},
}
Shouldn’t the above hook fire when the Loan status changes
from Sanctioned → Disbursed → Loan Closure Requested → Closed?
The hook is fired initially when I create a loan from the desk with the status as Sanctioned.
Would really appreciate any help.
Thanks.
Doesn’t work.
The loan status changes after I make an entry in Loan Disbursement
I am not changing the Loan status manually.
I tried and checked everything mentioned in the thread.
Nothing works.
This doesn’t work in production and also doesn’t work locally in dev mode.
jof2jc
7
After changing hooks always do bench clear-cache
Doesn’t work.
Checked the code found the issue,
The status of the loan is updated by raw SQL.
And that’s why hooks are not firing.