From e8c2a7fea07e529784f574c09fcb0ca9a012cafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 29 May 2012 17:21:38 +0200 Subject: [PATCH] Fix test on product_price product_price may be zero --- purchase_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_request.py b/purchase_request.py index e54cad996a..a1e754b6c9 100644 --- a/purchase_request.py +++ b/purchase_request.py @@ -712,7 +712,7 @@ class CreatePurchase(Wizard): product_price = product_price.quantize( Decimal(1) / 10 ** line_obj.unit_price.digits[1]) - if not product_price: + if product_price is None: self.raise_user_error('missing_price', (request.product.name, request.product.id), 'please_update') line['unit_price'] = product_price