Stock behaviour and linked manufacture module

Since i’m working in a company which manufactures products (composed by other sub-products), here is my suggestion.

It would be good to “decrease” the stock of a sub-product once a manufactured product is added to Stock. (Following the logic that once the final product is added to stock, it has actually been assembled with # sub-products). Therefor this sub-products “in reality” are not longer available in stock.

At this point adding a composed product augments the stock of sub-products, which could be incorrect.

If sub-products stock would decrease, it would be possible to directly create a new manufacturing module which is really what would make Dolibarr stand out to other Open Source ERP products.

I personally think this is a big shift, but will be necessary.

Actually there is a very easy way to do this. My reply is a little late, so I know if this was available back when this message was posted, but here it is:

Go to product module settings and “Activate sub products”.

Go to your product that you manufacture. Click on sub-products and then “Associate”.

Here pick all the products that are put into this product. Make sure you make your associations in negative numbers, so when you increase your manufactured product stock, the other products will be automatically decreased.

You can have any settings you want, for example right now I have one product consuming 1/48 cartons, 170g of oil, 1 piece of lid and one piece of bottle, 10g of another oil etc - I can track all my input stock!

1 Like

Wait, actually I think the stock will then go back up when you sell the main product…

If we make two main products - one for selling - and one for manufacturing, and associate the selling one with manufacturing one, (by +1) and then associate the production one with the rest of the inputs (in negative way), then we can solve this issue.

Then, we select the selling product for proposals, orders and invoices, but look at the production one for stock control.

The stock for the sold product will always go minus, (indicating total number sold), and the manufactured product will always show the real stock.

Nah, doesn’t work that way. If you relate a product to a product that is related, the first one effects all of the related products, so again a sale leads to input products increasing in stock…

There needs to be a way to assocate products in only one way -
decrease inputs when increased (manufactured)
do nothing when decreased (sales)

Is this little tweak possible eldy?

Denizar:
You need to associate the selling product as sub-product of manufacturing one (+1) and it works:
- Manufactured product added to stock leads to selling product added to stock.
- Selling product delivered does not affect stock of manufactured product.
So, the real stock counting for finished product is the stock for selling product. The stock for manufactured product will only give the data of manufactured units.

Another note to adapt Dolibarr for manufacturing:
In our case the sub-products have more than one level. For example we use raw material to CNC machine parts to finally assemble a final product. We want to control stock for final product, machined parts and raw material. The solution:
- Raw material as sub-product of machined part (X negative)
- Machined part as sub-product of final product (negative)
- Raw material as sub-product of final product (X negative)
This way, increasing stock of final product will decrease stock of machined product and will not affect stock of raw material (raw material stock is only decreased when adding the stock of machined part).

The system is not easy if BOM of the product is complicated. I’m trying to create association inputs from .csv file directly in database.