From: Tollef Fog Heen Date: Wed, 1 Aug 2012 18:28:51 +0000 (+0200) Subject: Add absolute url property on invoice X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc55d9a555355b8381458ab512b65ed3530b501;p=peojumk Add absolute url property on invoice --- diff --git a/invoice/models.py b/invoice/models.py index 4f6634c..a73bf91 100644 --- a/invoice/models.py +++ b/invoice/models.py @@ -62,6 +62,9 @@ class Invoice(models.Model): due_label = property(_due_label) due_days = property(_due_label) + @models.permalink + def get_absolute_url(self): + return ('invoice:invoice_view', [str(self.id)]) class VAT(models.Model): """ Model representing different taxes to be used in Invoices"""