From 9da77f73ffc9322e99f8b1ec59e463540f4f256d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 4 Feb 2013 20:05:15 +0100 Subject: [PATCH] unit or product could be None issue2976 review659002 --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 0ccfde4931..e028b87503 100644 --- a/invoice.py +++ b/invoice.py @@ -1914,7 +1914,7 @@ class InvoiceLine(ModelSQL, ModelView): res[field] = getattr(self, field) for field in ('unit', 'product', 'account'): - res[field] = getattr(self, field).id + res[field] = getattr(getattr(self, field), 'id', None) res['taxes'] = [] if self.taxes: