def save_related(self, request, form, formsets, change):
super(InvoiceAdmin, self).save_related(request, form, formsets, change)<EOL>invoice = form.instance<EOL>for attr in ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']:<EOL><INDENT>setattr(invoice,attr,sum([getattr(x,attr) for x in invoice.invoiceitem_set.all()]))<EOL><DEDENT>invoice.save()<EOL>
Update the Invoice object after saving so that the invoice lines
match the invoice item lines.