diff --git a/InvenTree/company/migrations/0033_auto_20210410_1528.py b/InvenTree/company/migrations/0033_auto_20210410_1528.py new file mode 100644 index 0000000000..12153a9ef6 --- /dev/null +++ b/InvenTree/company/migrations/0033_auto_20210410_1528.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2021-04-10 05:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0032_auto_20210403_1837'), + ] + + operations = [ + migrations.AlterField( + model_name='company', + name='description', + field=models.CharField(blank=True, help_text='Description of the company', max_length=500, verbose_name='Company description'), + ), + ] diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index 17091dcbc3..d83748c930 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -95,7 +95,12 @@ class Company(models.Model): help_text=_('Company name'), verbose_name=_('Company name')) - description = models.CharField(max_length=500, verbose_name=_('Company description'), help_text=_('Description of the company')) + description = models.CharField( + max_length=500, + verbose_name=_('Company description'), + help_text=_('Description of the company'), + blank=True, + ) website = models.URLField(blank=True, verbose_name=_('Website'), help_text=_('Company website URL')) diff --git a/InvenTree/company/templates/company/supplier_part_stock.html b/InvenTree/company/templates/company/supplier_part_stock.html index 49a5a809c2..524c508957 100644 --- a/InvenTree/company/templates/company/supplier_part_stock.html +++ b/InvenTree/company/templates/company/supplier_part_stock.html @@ -22,7 +22,7 @@ params: { supplier_part: {{ part.id }}, location_detail: true, - part_detail: true, + part_detail: false, }, groupByField: 'location', buttons: ['#stock-options'], diff --git a/InvenTree/part/admin.py b/InvenTree/part/admin.py index 4681404ba1..af2f615803 100644 --- a/InvenTree/part/admin.py +++ b/InvenTree/part/admin.py @@ -16,8 +16,6 @@ from .models import PartCategoryParameterTemplate from .models import PartTestTemplate from .models import PartSellPriceBreak -from InvenTree.helpers import normalize - from stock.models import StockLocation from company.models import SupplierPart @@ -180,7 +178,7 @@ class BomItemResource(ModelResource): Ref: https://django-import-export.readthedocs.io/en/latest/getting_started.html#advanced-data-manipulation-on-export """ - return normalize(item.quantity) + return float(item.quantity) def before_export(self, queryset, *args, **kwargs): diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index cd4f9ab2fa..2d1385f89c 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -40,7 +40,7 @@ params: { part: {{ part.id }}, location_detail: true, - part_detail: true, + part_detail: false, }, groupByField: 'location', buttons: [ diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index a72b727f69..04518a0c65 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -165,13 +165,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }} {% if item.in_stock %}