I did some research and with the help of @CZoellner. This is how I've updated the onhand quantity in model stock.quant
env['stock.quant']._update_available_quantity(record.x_studio_tools,record.x_studio_stock_location,1).
Thank you @CZoellner