-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual product stock correction #13368
Comments
And if the child product is used in several virtual products, what happens ? All parents should be changed ?? |
Thanks, @atm-maxime I haven't thought about this case. It looks like some people may use one virtual product to create more than one product and the actual behaviour of virtual products functionality works for them but it doesn't work for me. Maybe it's not a bug but functionality like that should be added to the actual virtual products (with an option to enable it and disable it) or a new functionality should be created as eg. virtual products 2? What do you think? |
I think either you need production modules to manufacture your set product and consume product 1,2 and 3. Or you need a specific virtual stock calculation on virtual products to show you how many you can sell based on the components in stock. In reality you never have at the same time the stock of your components and the stock of your set. Your example here "To make Set1 I need 1 x Product1, 1 x Product2, 1 x Product3 so if I have 5 x Product1, 5 x Product2, 5 x Product3 then I should have 5 x Set1" is wrong in my opinion. In stock either you have your components or you have your set but you can't have both at the same time or this means your stock is doubled. Or the "5 x 1 set1" is a virtual stock as said before, or something we might call "the composable stock". I think the good feature request you need is that your virtual product doesn't have a stock, only a possible stock, and that this calculated value should be displayed on the virtual product card and when you choose this product in a document. |
I like your approach and you explained very well in your video virtual stock of virtual product should have increased of 2 I think we need more fields to differentiate virtual stock (stocks - orders + supplier orders) Understand ? |
Thank you @BebZ In the video I have adjusted parent product by 10 so virtual should increase by 50 (and it was as expected) but then I adjusted quantity of the virtual product to 0 so the parent product should be 0 as well. The example from the video is |
Thanks @atm-maxime but I think I can have "at the same time the stock of your components and the stock of your set" |
@atm-maxime any idea how I can archive this functionality? If the Dolibarr team believes the actual functionality is the right one I do respect that but to stop wasting time in my business I would need to have the expected behaviour: When parent product quantity is changed the child quantity changes and when child product quantity is changed the parent product quantity is changed. |
Hi. |
Thanks @atm-maxime When the child product has several parent products then the parent products should change only if the criteria are met. Let's say we have parent products "A", "B", "C" and "D" and all of them need a child product "Child1". |
Example 3: |
yes in Example 3 when the stock of product B changes then the child should change and products A, C and D should change as well but only if the change meets criteria (A needs 2 x Child1, B needs 5 x Child1, C needs 1 x Child1, D needs 10 x Child1) |
Current behavior is the expected behavior. |
Can someone recommend an external module which would allow achieving that? |
Bug
Stock correction of the virtual product has no effect on the parent product. I have attached the video that explains the bug. If the team thinks it's not a bug, please change the label to Feature Request
https://1drv.ms/v/s!AkCF1g4VB-lZhnzpk4fWknnyAlyg
Environment
Expected and actual behavior
Actual behaviour: When parent product quantity is changed the child (virtual product) quantity changes which is correct and expected but when child product quantity is changed the parent product quantity do not change.
Expected behaviour: When parent product quantity is changed the child quantity changes and when child product quantity is changed the parent product quantity is changed.
Steps to reproduce the behavior
Create 2 products (parent and child) add the child product to the main product in the virtual products tab input quantity and tick the box "Increase/Decrease stock on parent change". Go to Stock tab of the virtual product and adjust the stock then go to parent product and check the stock quantity.
The text was updated successfully, but these errors were encountered: