Add hosting bill view, model and urls
This commit is contained in:
parent
9884eefa19
commit
2ff8b9e4a5
9 changed files with 330 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
|
||||
import oca
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.functional import cached_property
|
||||
|
|
@ -233,3 +234,18 @@ class ManageVM(models.Model):
|
|||
|
||||
class Meta:
|
||||
managed = False
|
||||
|
||||
class HostingBill(AssignPermissionsMixin, models.Model):
|
||||
customer = models.ForeignKey(StripeCustomer)
|
||||
billing_address = models.ForeignKey(BillingAddress)
|
||||
|
||||
permissions = ('view_hostingbill',)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_hostingbill', 'View Hosting Bill'),
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return "%s" % (self.customer.user.email)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue