You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
705 B
22 lines
705 B
# -*- coding: utf-8 -*-
|
|
from django.db import models
|
|
|
|
from .invoice import Invoice
|
|
from .. import consts
|
|
|
|
|
|
class SignedStatusFieldMixin(models.Model):
|
|
"""Mixin: добавляет поле `Подписан?`"""
|
|
signed_status = models.BooleanField(u'Подписан?', choices=consts.BOOL_CHOICES, default=False)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
|
|
class InvoiceFieldMixin(models.Model):
|
|
"""Mixin: добавляет FK поле `Создать по счёту`"""
|
|
invoice = models.ForeignKey(Invoice, related_name='+', verbose_name=u'Создать по счёту', blank=True, null=True,
|
|
default=None, on_delete=models.SET_NULL)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|