I would like to get the specific information from different model therefore I have use the method of select_related to fetch the data but I unable to save the record into db. How to use select_related in save method?
Let say I have following models models.py
Now I would like to get the product_quantity from stocklist and do a subtraction between product_quantity and shipping_qty(from stockOut models) to get the final quantity that remain.
But I unable to save/update the value into db when I use the method of select_related to get the specific information. How would I go about doing this? Thanks.