From 2eade50d8e99eb06eb1275e45036c73a0970d311 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 12 Oct 2015 08:36:19 +0200 Subject: [PATCH] [FIX] purchase: missing depends In case the product is a service, no move_ids are linked to it, and the quantity delivered is never calculated. --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 477bc01909d..3c44c1bd339 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -423,7 +423,7 @@ class PurchaseOrderLine(models.Model): qty += inv_line.uom_id._compute_qty_obj(inv_line.uom_id, inv_line.quantity, line.product_uom) line.qty_invoiced = qty - @api.depends('move_ids.state') + @api.depends('order_id.state', 'move_ids.state') def _compute_qty_received(self): for line in self: if line.order_id.state not in ['purchase', 'done']: