I declared my choice as
STATUS_CHOICES = ( (‘A’, ‘available’), (‘N’, ‘new’), (‘R’, ‘reserved’), (‘S’, ‘sold-out’), ) And i use this preferences in my Item model to show the current status of my item
“status = models.CharField(choices=STATUS_CHOICES, max_length=1)”
My problem here is that based on the “stock_no” category in my item model
“stock_no = models.CharField(max_length=10)”
The product status should automatically change from “Available to Reserved” or “Available to Sold-Out” can some one please help me with the logic for this issue
Thank you