mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Remove client-side length validation in form inputs (#3911)
* Remove client-side length validation in form inputs - Let the server throw an error (so the user sees it) * Update instances of models.URLField to InvenTreeURLField
This commit is contained in:
29
InvenTree/order/migrations/0075_auto_20221110_0108.py
Normal file
29
InvenTree/order/migrations/0075_auto_20221110_0108.py
Normal file
@ -0,0 +1,29 @@
|
||||
# Generated by Django 3.2.16 on 2022-11-10 01:08
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('order', '0074_auto_20220709_0108'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='purchaseorder',
|
||||
name='link',
|
||||
field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to external page', verbose_name='Link'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesorder',
|
||||
name='link',
|
||||
field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to external page', verbose_name='Link'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='salesordershipment',
|
||||
name='link',
|
||||
field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to external page', verbose_name='Link'),
|
||||
),
|
||||
]
|
@ -30,7 +30,7 @@ from common.settings import currency_code_default
|
||||
from company.models import Company, SupplierPart
|
||||
from InvenTree.exceptions import log_error
|
||||
from InvenTree.fields import (InvenTreeModelMoneyField, InvenTreeNotesField,
|
||||
RoundingDecimalField)
|
||||
InvenTreeURLField, RoundingDecimalField)
|
||||
from InvenTree.helpers import decimal2string, getSetting, notify_responsible
|
||||
from InvenTree.models import InvenTreeAttachment, ReferenceIndexingMixin
|
||||
from InvenTree.status_codes import (PurchaseOrderStatus, SalesOrderStatus,
|
||||
@ -81,7 +81,7 @@ class Order(MetadataMixin, ReferenceIndexingMixin):
|
||||
|
||||
description = models.CharField(max_length=250, verbose_name=_('Description'), help_text=_('Order description'))
|
||||
|
||||
link = models.URLField(blank=True, verbose_name=_('Link'), help_text=_('Link to external page'))
|
||||
link = InvenTreeURLField(blank=True, verbose_name=_('Link'), help_text=_('Link to external page'))
|
||||
|
||||
creation_date = models.DateField(blank=True, null=True, verbose_name=_('Creation Date'))
|
||||
|
||||
@ -1254,7 +1254,7 @@ class SalesOrderShipment(models.Model):
|
||||
help_text=_('Reference number for associated invoice'),
|
||||
)
|
||||
|
||||
link = models.URLField(
|
||||
link = InvenTreeURLField(
|
||||
blank=True,
|
||||
verbose_name=_('Link'),
|
||||
help_text=_('Link to external page')
|
||||
|
Reference in New Issue
Block a user