Add has_reduction property

This commit is contained in:
Ludovic Stephan 2019-11-27 14:11:53 +01:00
parent 14164ec4a5
commit 20ceec0e64
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Generated by Django 2.2.7 on 2019-11-27 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("kfet", "0069_happy_new_year"),
]
operations = [
migrations.AddField(
model_name="articlecategory",
name="has_reduction",
field=models.BooleanField(
default=True,
help_text="Si oui, la réduction COF s'applique aux articles de cette catégorie",
verbose_name="réduction COF",
),
),
]

View file

@ -464,6 +464,12 @@ class ArticleCategory(models.Model):
"appliquée aux articles de "
"cette catégorie.",
)
has_reduction = models.BooleanField(
"réduction COF",
default=True,
help_text="Si oui, la réduction COF s'applique"
" aux articles de cette catégorie",
)
def __str__(self):
return self.name