Add hosting bill view, model and urls

This commit is contained in:
Modulos 2017-05-05 14:59:11 +02:00
commit 2ff8b9e4a5
9 changed files with 330 additions and 3 deletions

View file

@ -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)