forked from DGNum/gestioCOF
Add has_reduction property
This commit is contained in:
parent
14164ec4a5
commit
20ceec0e64
2 changed files with 28 additions and 0 deletions
22
kfet/migrations/0070_articlecategory_has_reduction.py
Normal file
22
kfet/migrations/0070_articlecategory_has_reduction.py
Normal 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",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -464,6 +464,12 @@ class ArticleCategory(models.Model):
|
||||||
"appliquée aux articles de "
|
"appliquée aux articles de "
|
||||||
"cette catégorie.",
|
"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):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
Loading…
Reference in a new issue