whoopsie
This commit is contained in:
parent
c6d4c1edc3
commit
3a02cb0035
|
@ -25,6 +25,12 @@ class Order(CreatedUpdatedModel):
|
||||||
through='shop.OrderProductRelation'
|
through='shop.OrderProductRelation'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
user = models.ForeignKey(
|
||||||
|
'auth.User',
|
||||||
|
verbose_name=_('User'),
|
||||||
|
help_text=_('The user this order belongs to.'),
|
||||||
|
related_name='orders',
|
||||||
|
)
|
||||||
|
|
||||||
paid = models.BooleanField(
|
paid = models.BooleanField(
|
||||||
verbose_name=_('Paid?'),
|
verbose_name=_('Paid?'),
|
||||||
|
@ -259,7 +265,7 @@ class EpayPayment(CreatedUpdatedModel, UUIDModel):
|
||||||
|
|
||||||
|
|
||||||
class CreditNote(CreatedUpdatedModel):
|
class CreditNote(CreatedUpdatedModel):
|
||||||
amount = models.DecimalField()
|
amount = models.DecimalField(max_digits=10, decimal_places=2)
|
||||||
text = models.TextField()
|
text = models.TextField()
|
||||||
pdf = models.FileField(
|
pdf = models.FileField(
|
||||||
null=True,
|
null=True,
|
||||||
|
@ -295,6 +301,7 @@ class CreditNote(CreatedUpdatedModel):
|
||||||
def filename(self):
|
def filename(self):
|
||||||
return 'bornhack_creditnote_%s.pdf' % self.pk
|
return 'bornhack_creditnote_%s.pdf' % self.pk
|
||||||
|
|
||||||
|
|
||||||
class Invoice(CreatedUpdatedModel):
|
class Invoice(CreatedUpdatedModel):
|
||||||
order = models.OneToOneField('shop.Order')
|
order = models.OneToOneField('shop.Order')
|
||||||
pdf = models.FileField(null=True, blank=True, upload_to='invoices/')
|
pdf = models.FileField(null=True, blank=True, upload_to='invoices/')
|
||||||
|
|
Loading…
Reference in a new issue