This question has been flagged
1 Reply
5387 Views

I am using Odoo 12.0 latest from Git and I have a question regarding product variants. I read the documentation, but sometimes I don't know what would be the best choice. For example I have a Product called Beans and it's 25kg, I leave it as Unit for now. I purchased some, but I want to repackage it. So I created variants Size - 10kg, 25kg and now I don't have Quantity on Hands anymore. 

1. Is it better to have separate products in this case?

2. How can I restore the Quantity on Hands for the product? Even if I delete the variants the Quantity on Hands is not coming back. I don't see an entry in the DB with stock_quant, is this the only row introduced for this?

I can see the Lot and the Purchase is connected with it, I see the Receipt also, but the lot shows 0 quantity. 


Thank you for your help.

Avatar
Discard
Best Answer

Hi, the clue to the issue is how Odoo works when it generates new variants.

Initially you have the product template 'Beans'. Each template (even without attributes) has at least a single variant. So,

-----   Template 1 'Beans': Variant 1 - 'Beans'

As soon as you had added new attributes, this template was either archived (if it was used in some documents like sale order line or moves), or was deleted (if not). Now we have:

-----  Template 1 'Beans': Variant 2 'Beans 10kg', Variant 3 'Beans 25 kg'.

----- Sometimes the Archived Variant 1 'Beans'

To check that you have the latter, go to product variants' tree view, and select the filter 'Archived'. Then, try to find yours. If it is here (I guess, it should be), restore it, and its stocks would be the same as before archivation.


As for the question how to better organize the process. Basically, there is no a correct answer: it depends how you feel better. Just a few hints:

  1. Stocks between different variants are not splited. Variants always have own stocks, although on product templates they are aggregated.

  2. It is easier to work with templates pricings, since variant price is template price plus surplus. It is not so bad, but just simpler to work with linear prices.

  3. If you had multiple attributes, for cleaner structure it is better to use variants instead of thousands of templates.

  4. In case you have 1,2,3, 25kg products: it is better to have a single product and apply different units of measure in orders, and price lists for decreasing price per kg.

Hope, my answer will help you.




Avatar
Discard