stock.move necesita product.product en vez de product.template si están activas las variantes.

This commit is contained in:
snt 2021-09-16 15:41:36 +02:00
parent 12deffe026
commit 9ba3aa0f86

View file

@ -25,7 +25,7 @@ class ProductTemplate(models.Model):
if p.qty_available > 0:
move_vals = {
'name': p.name,
'product_id': p.id,
'product_id': p.product_variant_id.id,
'product_uom_qty': p.qty_available,
'product_uom': p.uom_id.id,
'picking_id': picking.id,