Fix display error for quote numbers in edit view
This commit is contained in:
parent
2feb3e637b
commit
8c42b386f3
2 changed files with 7 additions and 3 deletions
|
@ -15,6 +15,10 @@ class Quote(Model):
|
|||
expiry = DateField()
|
||||
currency = ForeignKey(Currency, on_delete=PROTECT)
|
||||
|
||||
@property
|
||||
def display_number(self):
|
||||
return self.number or self.id
|
||||
|
||||
class QuoteItem(Model):
|
||||
invoice = ForeignKey(Quote, on_delete=CASCADE)
|
||||
sort = PositiveIntegerField()
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<div class="card-header-tab card-header-tab-animation card-header">
|
||||
<div class="card-header-title">
|
||||
<i class="header-icon lnr-apartment icon-gradient bg-love-kiss"> </i>
|
||||
Editing {{ object.number or object.id }}
|
||||
Editing {{ object.display_number }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
Loading…
Reference in a new issue