mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Rename "manufacturer" to "manufacturer_name"
This commit is contained in:
parent
34abf34c0f
commit
e9e734acce
@ -121,7 +121,7 @@ class SupplierPartList(generics.ListCreateAPIView):
|
|||||||
search_fields = [
|
search_fields = [
|
||||||
'SKU',
|
'SKU',
|
||||||
'supplier__name',
|
'supplier__name',
|
||||||
'manufacturer',
|
'manufacturer_name',
|
||||||
'description',
|
'description',
|
||||||
'MPN',
|
'MPN',
|
||||||
]
|
]
|
||||||
|
@ -53,6 +53,7 @@ class EditSupplierPartForm(HelperForm):
|
|||||||
'SKU',
|
'SKU',
|
||||||
'description',
|
'description',
|
||||||
'manufacturer',
|
'manufacturer',
|
||||||
|
'manufacturer_name',
|
||||||
'MPN',
|
'MPN',
|
||||||
'link',
|
'link',
|
||||||
'note',
|
'note',
|
||||||
|
18
InvenTree/company/migrations/0017_auto_20200413_0320.py
Normal file
18
InvenTree/company/migrations/0017_auto_20200413_0320.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 2.2.10 on 2020-04-13 03:20
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('company', '0016_auto_20200412_2330'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='supplierpart',
|
||||||
|
old_name='manufacturer',
|
||||||
|
new_name='manufacturer_name',
|
||||||
|
),
|
||||||
|
]
|
@ -224,7 +224,7 @@ class SupplierPart(models.Model):
|
|||||||
part: Link to the master Part
|
part: Link to the master Part
|
||||||
supplier: Company that supplies this SupplierPart object
|
supplier: Company that supplies this SupplierPart object
|
||||||
SKU: Stock keeping unit (supplier part number)
|
SKU: Stock keeping unit (supplier part number)
|
||||||
manufacturer: Manufacturer name
|
manufacturer: Company that manufactures the SupplierPart (leave blank if it is the sample as the Supplier!)
|
||||||
MPN: Manufacture part number
|
MPN: Manufacture part number
|
||||||
link: Link to external website for this part
|
link: Link to external website for this part
|
||||||
description: Descriptive notes field
|
description: Descriptive notes field
|
||||||
@ -261,7 +261,14 @@ class SupplierPart(models.Model):
|
|||||||
|
|
||||||
SKU = models.CharField(max_length=100, help_text=_('Supplier stock keeping unit'))
|
SKU = models.CharField(max_length=100, help_text=_('Supplier stock keeping unit'))
|
||||||
|
|
||||||
manufacturer = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer'))
|
manufacturer = models.ForeignKey(Company, on_delete=models.SET_NULL,
|
||||||
|
related_name='manufactured_parts',
|
||||||
|
limit_choices_to={'is_manufacturer': True},
|
||||||
|
help_text=_('Select manufacturer'),
|
||||||
|
null=True, blank=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
manufacturer_name = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer'))
|
||||||
|
|
||||||
MPN = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer part number'))
|
MPN = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer part number'))
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ class SupplierPartSerializer(InvenTreeModelSerializer):
|
|||||||
'supplier_logo',
|
'supplier_logo',
|
||||||
'SKU',
|
'SKU',
|
||||||
'manufacturer',
|
'manufacturer',
|
||||||
|
'manufacturer_name',
|
||||||
'description',
|
'description',
|
||||||
'MPN',
|
'MPN',
|
||||||
'link',
|
'link',
|
||||||
|
Loading…
Reference in New Issue
Block a user