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))