From 20ceec0e648e2a3697c7a75997a3bd072d4b0e2b Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Wed, 27 Nov 2019 14:11:53 +0100 Subject: [PATCH] Add has_reduction property --- .../0070_articlecategory_has_reduction.py | 22 +++++++++++++++++++ kfet/models.py | 6 +++++ 2 files changed, 28 insertions(+) create mode 100644 kfet/migrations/0070_articlecategory_has_reduction.py diff --git a/kfet/migrations/0070_articlecategory_has_reduction.py b/kfet/migrations/0070_articlecategory_has_reduction.py new file mode 100644 index 00000000..c657dfdd --- /dev/null +++ b/kfet/migrations/0070_articlecategory_has_reduction.py @@ -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", + ), + ), + ] diff --git a/kfet/models.py b/kfet/models.py index a2d776b9..814f857a 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -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