[FIX] mrp: Wrong virtual_available on product.template with kit

Steps to reproduce:
- Let's consider a product.template TP with a kit
- Let's consider the variants V1, the only variant  of TP with a kit
- The virtual_availalbe of V1 is 100 (smart button Forecasted in the form view)

Bug:

The virtual_available of TP was 0 instead of 100
The virtaul_available of a product.template must be the sum of virtual_available of all its
variants with kit

PS: This commit changes the available quantity of product_product_table_kit in demo data.
As this quantity was not equal to 0, the type of the product could not be changed.

opw:2297226

closes odoo/odoo#57325

X-original-commit: 74b762da63e159b1965428b2bcb972293c4efea6
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
This commit is contained in:
Goffin Simon
2020-09-09 08:29:33 +00:00
co-authored by Florent de Labarre
parent 4e61415994
commit 617cc39b6f
-1
View File
@@ -62,7 +62,6 @@ class ProductTemplate(models.Model):
- 'qty_available'
- 'incoming_qty'
- 'outgoing_qty'
- 'free_qty'
"""
product_without_bom = self.browse([])
for product_template in self: