Because my employer will switch to Dolibarr soon for production use, I’m trying all functions we might possibly use for their behaviour so we know what to do and expect. (Dolibarr 3.1 installation)
Now I have come across some (for me unexpected) behaviour with subproducts and stock.
Scenario: we sell kits which contains various parts. We buy these parts from our suppliers. We sell the kits but also some of the parts are sold seperately.
I created the kit in Dolibarr and added the parts as subproducts.
Now when I add stock of the kit (manually), stock qty of the kit and stock qty of the parts is increased.
When the kit consists of only 1 part, and I increase stock of the part (manually), stock qty of both the kit and the part is increased.
However, when the kit consists of more than 1 part, and I increase stock of all the parts (manually), the stock of the kit is not increased.
When I decrease stock of the kit (manually), stock of both the kit and the parts is decreased.
But when I decrease stock of the parts, stock of the kit stays the same.
Is this behaviour correct and is it just not possible to sell the parts as well as the kits and keep stock correctly? Is there a document explaining stock behaviour in various cases (it is not on the wiki, but should be useful)? Maybe one of the developers can comment (if you explain it to me, I will put it in the wiki!)
I was thinking it might be useful to add some options to subproducts which define the relation between products and their subproducts and stock behaviour. I’m more than willing to help on this and do some coding work myself. Will this behaviour stay the same in 3.2 or will there be changes in the stock system?