From 4cc55d9a555355b8381458ab512b65ed3530b501 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Wed, 1 Aug 2012 20:28:51 +0200 Subject: [PATCH] Add absolute url property on invoice --- invoice/models.py | 3 +++ 1 file changed, 3 insertions(+) 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""" -- 2.39.5