From 65f6f4e3ae97ed0212efb9ca5fe621bb1791a10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 12 Oct 2009 16:50:19 +0200 Subject: [PATCH] Fix get_invoice_taxes when there is no invoice on the line --- invoice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/invoice.py b/invoice.py index dac94ad358..ad42ea75b7 100644 --- a/invoice.py +++ b/invoice.py @@ -1513,6 +1513,9 @@ class InvoiceLine(ModelSQL, ModelView): res = {} for line in self.browse(cursor, user, ids, context=context): + if not line.invoice: + res[line.id] = False + continue ctx = context.copy() ctx.update(invoice_obj.get_tax_context(cursor, user, line.invoice, context=context))