[treasury] Product quantities are finally decimal fields

This commit is contained in:
Yohann D'ANELLO 2021-03-21 10:39:37 +01:00
parent ec0bcbf015
commit b46ae6f856
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 2.2.19 on 2021-03-13 11:35
# Generated by Django 2.2.19 on 2021-03-21 09:34
import django.core.validators
from django.db import migrations, models
@ -15,7 +15,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='product',
name='quantity',
field=models.FloatField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
field=models.DecimalField(decimal_places=2, max_digits=7, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
),
migrations.AlterField(
model_name='specialtransactionproxy',

View File

@ -132,7 +132,9 @@ class Product(models.Model):
verbose_name=_("Designation"),
)
quantity = models.FloatField(
quantity = models.DecimalField(
decimal_places=2,
max_digits=7,
verbose_name=_("Quantity"),
validators=[MinValueValidator(0)],
)