mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove "required" attribute for order descriptions (#4595)
* Made the description field on the part model optional * Made the title field on the build model optional * Made the description field on the order model optional * Added migration files
This commit is contained in:
parent
b062accfe2
commit
713aec1ae3
18
InvenTree/build/migrations/0041_alter_build_title.py
Normal file
18
InvenTree/build/migrations/0041_alter_build_title.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.18 on 2023-04-12 17:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('build', '0040_auto_20230404_1310'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='build',
|
||||||
|
name='title',
|
||||||
|
field=models.CharField(blank=True, help_text='Brief description of the build (optional)', max_length=100, verbose_name='Description'),
|
||||||
|
),
|
||||||
|
]
|
@ -164,9 +164,9 @@ class Build(MPTTModel, InvenTreeBarcodeMixin, MetadataMixin, ReferenceIndexingMi
|
|||||||
|
|
||||||
title = models.CharField(
|
title = models.CharField(
|
||||||
verbose_name=_('Description'),
|
verbose_name=_('Description'),
|
||||||
blank=False,
|
blank=True,
|
||||||
max_length=100,
|
max_length=100,
|
||||||
help_text=_('Brief description of the build')
|
help_text=_('Brief description of the build (optional)')
|
||||||
)
|
)
|
||||||
|
|
||||||
parent = TreeForeignKey(
|
parent = TreeForeignKey(
|
||||||
|
28
InvenTree/order/migrations/0090_auto_20230412_1752.py
Normal file
28
InvenTree/order/migrations/0090_auto_20230412_1752.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Generated by Django 3.2.18 on 2023-04-12 17:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('order', '0089_auto_20230404_0030'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='purchaseorder',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(blank=True, help_text='Order description (optional)', max_length=250, verbose_name='Description'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='returnorder',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(blank=True, help_text='Order description (optional)', max_length=250, verbose_name='Description'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='salesorder',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(blank=True, help_text='Order description (optional)', max_length=250, verbose_name='Description'),
|
||||||
|
),
|
||||||
|
]
|
@ -197,7 +197,7 @@ class Order(InvenTreeBarcodeMixin, MetadataMixin, ReferenceIndexingMixin):
|
|||||||
|
|
||||||
return self.__class__.objects.filter(pk=self.pk).filter(self.__class__.overdue_filter()).exists()
|
return self.__class__.objects.filter(pk=self.pk).filter(self.__class__.overdue_filter()).exists()
|
||||||
|
|
||||||
description = models.CharField(max_length=250, verbose_name=_('Description'), help_text=_('Order description'))
|
description = models.CharField(max_length=250, blank=True, verbose_name=_('Description'), help_text=_('Order description (optional)'))
|
||||||
|
|
||||||
link = InvenTreeURLField(blank=True, verbose_name=_('Link'), help_text=_('Link to external page'))
|
link = InvenTreeURLField(blank=True, verbose_name=_('Link'), help_text=_('Link to external page'))
|
||||||
|
|
||||||
|
18
InvenTree/part/migrations/0104_alter_part_description.py
Normal file
18
InvenTree/part/migrations/0104_alter_part_description.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.18 on 2023-04-12 17:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('part', '0103_auto_20230317_0816'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='part',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(blank=True, help_text='Part description (optional)', max_length=250, verbose_name='Description'),
|
||||||
|
),
|
||||||
|
]
|
@ -856,9 +856,9 @@ class Part(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
description = models.CharField(
|
description = models.CharField(
|
||||||
max_length=250, blank=False,
|
max_length=250, blank=True,
|
||||||
verbose_name=_('Description'),
|
verbose_name=_('Description'),
|
||||||
help_text=_('Part description')
|
help_text=_('Part description (optional)')
|
||||||
)
|
)
|
||||||
|
|
||||||
keywords = models.CharField(
|
keywords = models.CharField(
|
||||||
|
Loading…
Reference in New Issue
Block a user