Добавил шаблон таблицы, переписал на него таблицу выхода заказов

This commit is contained in:
2015-06-06 15:50:19 +05:00
parent a84abc0c77
commit 7712e10682
6 changed files with 73 additions and 13 deletions

View File

@@ -68,7 +68,7 @@ class Order(models.Model):
contact = models.CharField(max_length=150, null=True, blank = True) #контактное лицо
phone_num = models.CharField(max_length=150,null=True, blank = True) #контактный телефон
cancelled = models.BooleanField(default=False) #отменен
cost_items = models.ManyToManyField(CostItem, through='OrderCosts') #статьи затрат
cost_items = models.ManyToManyField(CostItem, through='OrderCosts', related_name='+', null=True, blank=True) #статьи затрат
def __unicode__(self):
return ', '.join((self.date.strftime('%d %b %Y'), self.product.name, self.address))