From e2db0508ba3b6826a2c4e90c347e98394d6850c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 1 Sep 2008 18:18:43 +0200 Subject: [PATCH] Fix get_unit_digits to return always a value --- purchase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/purchase.py b/purchase.py index 9eaada1176..4d7fc93c96 100644 --- a/purchase.py +++ b/purchase.py @@ -681,6 +681,8 @@ class PurchaseLine(OSV): for line in self.browse(cursor, user, ids, context=context): if line.unit: res[line.id] = line.unit.digits + else: + res[line.id] = 2 return res def on_change_product(self, cursor, user, ids, vals, context=None):