From dd2ce6fe22d06f5f85998ceb2bfacb516aae1680 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 28 Sep 2016 11:50:11 +0200 Subject: [PATCH] Skip progres unit conversion when no product is set issue5899 review32611002 --- work.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/work.py b/work.py index 2666311ae3..ee240f9760 100644 --- a/work.py +++ b/work.py @@ -493,7 +493,9 @@ class Work: invoiced_progress = sum(x.effort_hours for x in self.invoiced_progress) quantity = self.effort_hours * self.progress - invoiced_progress - quantity = Uom.compute_qty(hour, quantity, self.product.default_uom) + if self.product: + quantity = Uom.compute_qty( + hour, quantity, self.product.default_uom) if quantity > 0: if not self.product: self.raise_user_error('missing_product', (self.rec_name,))