Skip to content

Commit

Permalink
increase character limits on all link fields to 2000 (#9131)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Oliver <[email protected]>
Co-authored-by: Joe Rogers <[email protected]>
  • Loading branch information
4 people authored Mar 4, 2025
1 parent d822b9b commit d96f0d7
Show file tree
Hide file tree
Showing 21 changed files with 501 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/backend/InvenTree/InvenTree/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
19 changes: 19 additions & 0 deletions src/backend/InvenTree/build/migrations/0055_auto_20250221_1230.py
Original file line number Diff line number Diff line change
@@ -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
),
]
24 changes: 24 additions & 0 deletions src/backend/InvenTree/build/migrations/0056_alter_build_link.py
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
5 changes: 4 additions & 1 deletion src/backend/InvenTree/build/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ def status_text(self):
)

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(
Expand Down
18 changes: 18 additions & 0 deletions src/backend/InvenTree/common/migrations/0035_auto_20250221_1513.py
Original file line number Diff line number Diff line change
@@ -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
),
]
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
1 change: 1 addition & 0 deletions src/backend/InvenTree/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,7 @@ def __str__(self):
null=True,
verbose_name=_('Link'),
help_text=_('Link to external URL'),
max_length=2000,
)

comment = models.CharField(
Expand Down
Original file line number Diff line number Diff line change
@@ -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
),
]
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
7 changes: 6 additions & 1 deletion src/backend/InvenTree/company/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def get_api_url():
)

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(
Expand Down Expand Up @@ -145,6 +148,7 @@ def get_api_url():
blank=True,
verbose_name=_('Link'),
help_text=_('Link to external company information'),
max_length=2000,
)

image = StdImageField(
Expand Down Expand Up @@ -440,6 +444,7 @@ def get_api_url():
blank=True,
verbose_name=_('Link'),
help_text=_('Link to address information (external)'),
max_length=2000,
)


Expand Down
64 changes: 64 additions & 0 deletions src/backend/InvenTree/order/migrations/0107_auto_20250221_1241.py
Original file line number Diff line number Diff line change
@@ -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
),
]
Loading

0 comments on commit d96f0d7

Please sign in to comment.