From 969307c28fef419c417f74470a0f3aecc9ec17c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Dec 2008 17:59:05 +0100 Subject: [PATCH] Fix get_purchase_price if the user has no company --- purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase.py b/purchase.py index 7c27f46dc3..a8ee234672 100644 --- a/purchase.py +++ b/purchase.py @@ -1240,7 +1240,7 @@ class Product(OSV): res[product.id] = uom_obj.compute_price(cursor, user, product.default_uom, res[product.id], uom, context=context) - if currency: + if currency and user2.company: if user2.company.currency.id != currency.id: res[product.id] = currency_obj.compute(cursor, user, user2.company.currency, res[product.id],