Can we be informed when a product becomes out of s...
# support
m
Can we be informed when a product becomes out of stock?
e
Is there maybe an event you could be listening to that has that information?
m
Ig there is no such event πŸ€”
j
You can probably add an after update decorator to the stock item class to detect and notify this?
πŸ™Œ 1
It will be per stock location but you could check across all stock locations in the method or whatever special case you want
πŸ™Œ 1
m
Thanks, got it.
b
I would update the adjust_count_on_hand method and see if that works.
The moment there's a
self.count_on_hand = 0
, you queue the notification.
m
@benmorganio that’s one way of doing it πŸ™Œ
b
You also may want to check where adjust is called and where set is called.
πŸ‘€ 1