From 93a2d612e2d2f8581e083f62cc84fe8b65f0c275 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 8 Mar 2023 23:35:12 +0100 Subject: [PATCH] extend part fields to fit large BOMs (#4475) Fiexes https://github.com/inventree/InvenTree/issues/2819 --- .../migrations/0100_alter_bomitem_reference.py | 18 ++++++++++++++++++ InvenTree/part/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 InvenTree/part/migrations/0100_alter_bomitem_reference.py diff --git a/InvenTree/part/migrations/0100_alter_bomitem_reference.py b/InvenTree/part/migrations/0100_alter_bomitem_reference.py new file mode 100644 index 0000000000..8e403125e0 --- /dev/null +++ b/InvenTree/part/migrations/0100_alter_bomitem_reference.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.18 on 2023-03-08 21:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0099_alter_bomitem_inherited'), + ] + + operations = [ + migrations.AlterField( + model_name='bomitem', + name='reference', + field=models.CharField(blank=True, help_text='BOM item reference', max_length=5000, verbose_name='Reference'), + ), + ] diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index d3b0408eaf..4e3e56e046 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -3583,7 +3583,7 @@ class BomItem(DataImportMixin, models.Model): help_text=_('Estimated build wastage quantity (absolute or percentage)') ) - reference = models.CharField(max_length=500, blank=True, verbose_name=_('Reference'), help_text=_('BOM item reference')) + reference = models.CharField(max_length=5000, blank=True, verbose_name=_('Reference'), help_text=_('BOM item reference')) # Note attached to this BOM line item note = models.CharField(max_length=500, blank=True, verbose_name=_('Note'), help_text=_('BOM item notes'))