erpnext
erpnext copied to clipboard
Hooks for Updates are not called when the status of a sales order is changed
Information about bug
When you open a sales Order and change its Status via the menu Bar the on_update or on_update_after_submit hooks are not called. This is due to the status updater code using db_set and not invoking hooks. It seams like this is by design although this prevents our usecase which needs a notification of status changes.
Module
selling
Version
v14.0.2 v.14.0.0
Installation method
docker
Relevant log output / Stack trace / Full Error Message.
No response
One current Workaround for this is adding a self.save call in the status updater which makes the events work but may have unintended sideeffects
Another alternative is to use on_chage
which is fired on db_set too, but you'll have to modify code to check docstatus too.