mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
increase character limits on all link fields to 2000 (#9131)
* increase character limits on all link fields to 2000 * update test to still trigger * Don't fail when diff is too big for echo (#9205) * Reduce severity of error message (#9209) - Currently flooding sentry.io with reports * Disable pagination for ConfigList class (#9210) * [API] Auth login error (#9212) Fixes #9211 * [UI] Table Update (#9220) - Retain user selection for pageSize * renumber migrations after merge from master * Remove quick actions (#9222) * Remove placeholder components - No function - Cleanup for 1.0.0 * Remove Placeholder.tsx * feat(backend): Add user profile (#9116) * Add user profile * fix choice set * ensure primary_group is valid * add missing migrations * fix tests * merge migrations * add migration test * add new model to ruleset * ensure changed to the m2m conenction also validate primary grups * move signals * fix import? * patch user language through * use set methods correctly * bump api * refactoring to make debugging and extending easier * fix dum recurrsion problem * fix user pk lookup * rename migration * add user and group page * cleanup * add hoverCard for user / owner / group render * include owner_model in owner responses * move user serializers to users * add profile to list * add brief serializer for profiles * ensure profile is present in most apis * extend rendered data * store and observe langauge in profile * reduce unneeded complexity * enable access to full profle (including internal fields) in me serializer * move theme to a single object * persist theme settings * fix radius lookup * remove debug message * fix filter * remove unused field * remove image fields * add setting to control showing profiles * fix settings * update test * fix theme reload * Add contact UI * Add profile edit screen * fix test * Add testing for user theme panel * fix var name * complete coverage of theme * Add test for new pages * make test more reliable in strict mode * remove step * fix ref * add verbose names * fix used setting * extend tests * fix permissions * fix lookup * use lookup to enuse ursls stay valid * update migrations * Add position field * fix permissions * Fix font size in location column (#9230) * [WIP] Background reports (#9199) * Update report generation progress * Add shim task for offloading report printing * Cleanup * Add detail endpoints for label and report outputs * Display report printing progress in UI * Implement similar for label printing * Reduce output for CI * Add plugin slug * Bump API version * Ensure it works with machine printing * Fix null comparison * Fix SKU link * Update playwright tests * Massively reduce log output when printing * handle null values in existing db data * fix test to pass at max character limit again --------- Co-authored-by: Matthias Mair <code@mjmair.com> Co-authored-by: Oliver <oliver.henry.walters@gmail.com> Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
This commit is contained in:
parent
d822b9b574
commit
d96f0d78e9
@ -50,8 +50,8 @@ class InvenTreeURLField(models.URLField):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
"""Initialization method for InvenTreeURLField."""
|
||||
# Max length for InvenTreeURLField is set to 200
|
||||
kwargs['max_length'] = 200
|
||||
# Max length for InvenTreeURLField is set to 2000
|
||||
kwargs['max_length'] = 2000
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 12:30
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("build", "0054_build_start_date"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='link',
|
||||
field=models.TextField() # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:46
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("build", "0055_auto_20250221_1230"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="build",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external URL",
|
||||
max_length=2000,
|
||||
verbose_name="External Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -400,7 +400,10 @@ class Build(
|
||||
)
|
||||
|
||||
link = InvenTree.fields.InvenTreeURLField(
|
||||
verbose_name=_('External Link'), blank=True, help_text=_('Link to external URL')
|
||||
verbose_name=_('External Link'),
|
||||
blank=True,
|
||||
help_text=_('Link to external URL'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
priority = models.PositiveIntegerField(
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 15:13
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("common", "0034_alter_inventreecustomuserstatemodel_unique_together_and_more"),
|
||||
]
|
||||
|
||||
operations = [migrations.AlterField(
|
||||
model_name='attachment',
|
||||
name='link',
|
||||
field=models.TextField() # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 15:15
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("common", "0035_auto_20250221_1513"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="attachment",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external URL",
|
||||
max_length=2000,
|
||||
null=True,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -1876,6 +1876,7 @@ class Attachment(InvenTree.models.MetadataMixin, InvenTree.models.InvenTreeModel
|
||||
null=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external URL'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
comment = models.CharField(
|
||||
|
@ -0,0 +1,39 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 12:36
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("company", "0071_manufacturerpart_notes_supplierpart_notes"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='website',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='address',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='supplierpart',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='manufacturerpart',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,55 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:46
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("company", "0072_auto_20250221_1236"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="address",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to address information (external)",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="company",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external company information",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="company",
|
||||
name="website",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Company website URL",
|
||||
max_length=2000,
|
||||
verbose_name="Website",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="supplierpart",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="URL for external supplier part link",
|
||||
max_length=2000,
|
||||
null=True,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 14:51
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("company", "0073_alter_address_link_alter_company_link_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="manufacturerpart",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="URL for external manufacturer part link",
|
||||
max_length=2000,
|
||||
null=True,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -117,7 +117,10 @@ class Company(
|
||||
)
|
||||
|
||||
website = InvenTreeURLField(
|
||||
blank=True, verbose_name=_('Website'), help_text=_('Company website URL')
|
||||
blank=True,
|
||||
verbose_name=_('Website'),
|
||||
help_text=_('Company website URL'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
phone = models.CharField(
|
||||
@ -145,6 +148,7 @@ class Company(
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external company information'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
image = StdImageField(
|
||||
@ -440,6 +444,7 @@ class Address(InvenTree.models.InvenTreeModel):
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to address information (external)'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
|
||||
|
@ -0,0 +1,64 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 12:41
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("order", "0106_purchaseorder_start_date_returnorder_start_date_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='purchaseorder',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesorder',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='returnorder',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='purchaseorderlineitem',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesorderlineitem',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='returnorderlineitem',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='purchaseorderextraline',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesorderextraline',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='returnorderextraline',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesordershipment',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,114 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 14:57
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("order", "0107_auto_20250221_1241"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="purchaseorder",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="purchaseorderlineitem",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="returnorder",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="returnorderlineitem",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="salesorder",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="salesorderlineitem",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="salesordershipment",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="purchaseorderextraline",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="returnorderextraline",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="salesorderextraline",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external page",
|
||||
max_length=2000,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -354,7 +354,10 @@ class Order(
|
||||
)
|
||||
|
||||
link = InvenTreeURLField(
|
||||
blank=True, verbose_name=_('Link'), help_text=_('Link to external page')
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external page'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
start_date = models.DateField(
|
||||
@ -1540,7 +1543,10 @@ class OrderLineItem(InvenTree.models.InvenTreeMetadataModel):
|
||||
)
|
||||
|
||||
link = InvenTreeURLField(
|
||||
blank=True, verbose_name=_('Link'), help_text=_('Link to external page')
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external page'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
target_date = models.DateField(
|
||||
@ -1988,7 +1994,10 @@ class SalesOrderShipment(
|
||||
)
|
||||
|
||||
link = InvenTreeURLField(
|
||||
blank=True, verbose_name=_('Link'), help_text=_('Link to external page')
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external page'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
def is_complete(self):
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:09
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("part", "0133_alter_partcategory__icon"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:46
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("part", "0134_auto_20250221_1309"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="part",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external URL",
|
||||
max_length=2000,
|
||||
null=True,
|
||||
verbose_name="Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -1071,6 +1071,7 @@ class Part(
|
||||
null=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external URL'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
image = StdImageField(
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:23
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("stock", "0114_alter_stocklocation_custom_icon"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='link',
|
||||
field=models.TextField(null=True, blank=True) # Temporary change to force new ALTER COLUMN operation in the next migration
|
||||
),
|
||||
]
|
@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.2.19 on 2025-02-21 13:46
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("stock", "0115_auto_20250221_1323"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="stockitem",
|
||||
name="link",
|
||||
field=InvenTree.fields.InvenTreeURLField(
|
||||
blank=True,
|
||||
help_text="Link to external URL",
|
||||
max_length=2000,
|
||||
verbose_name="External Link",
|
||||
),
|
||||
),
|
||||
]
|
@ -935,7 +935,10 @@ class StockItem(
|
||||
serial_int = models.IntegerField(default=0)
|
||||
|
||||
link = InvenTreeURLField(
|
||||
verbose_name=_('External Link'), blank=True, help_text=_('Link to external URL')
|
||||
verbose_name=_('External Link'),
|
||||
blank=True,
|
||||
help_text=_('Link to external URL'),
|
||||
max_length=2000,
|
||||
)
|
||||
|
||||
batch = models.CharField(
|
||||
|
@ -155,7 +155,7 @@ class StockTest(StockTestBase):
|
||||
item.full_clean()
|
||||
|
||||
# A long URL should fail
|
||||
long_url = 'https://website.co.uk?query=' + 'a' * 173
|
||||
long_url = 'https://website.co.uk?query=' + 'a' * 1973
|
||||
|
||||
with self.assertRaises(ValidationError):
|
||||
item.link = long_url
|
||||
|
Loading…
x
Reference in New Issue
Block a user