I have models class for Inventory Transfers or Issues Details. In the save method, i am accessing current stock level in a different model class for WarehouseStockStatus. I wish to message to the user from models.py if transferred or issued quantity exceeds current inventory levels. I am using django admin screens only. Print method will not work. Raise Validation error doesn’t work. Also Messages will not work as it works only in views and templates where you have Request object. Any suggestions on how to proceed ?
I expect to print the message to the user.
1