Warehouse quantity

hi, i want manage warehouse, but i have this situation:
i have row material flour (for example 10kg)
a finished product cake

The cake is made from 400g of flour, so in cake i set subproduct flour with 400g qty.
When i create a cake i want decrease flour quantity from warehouse, i create 2 cake my flour quantity must change to 9,2kg.
But if i create cake the flour quantity increase to 10,8kg and i want the opposite.
How i can solve?

thanks

Use BOM (BILLS OF MATERIAL) and MANUFACTURING ORDERS modules for this. :slight_smile:

Use BOM as you are trying to make a final product from some raw material that means those raw materials are also a product.