mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Rename "manufacturer" to "manufacturer_name"
(cherry picked from commit e9e734acce
)
This commit is contained in:
parent
2a4e8cd062
commit
8b366fc4a0
@ -121,7 +121,7 @@ class SupplierPartList(generics.ListCreateAPIView):
|
||||
search_fields = [
|
||||
'SKU',
|
||||
'supplier__name',
|
||||
'manufacturer',
|
||||
'manufacturer_name',
|
||||
'description',
|
||||
'MPN',
|
||||
]
|
||||
|
@ -53,6 +53,7 @@ class EditSupplierPartForm(HelperForm):
|
||||
'SKU',
|
||||
'description',
|
||||
'manufacturer',
|
||||
'manufacturer_name',
|
||||
'MPN',
|
||||
'link',
|
||||
'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
|
||||
supplier: Company that supplies this SupplierPart object
|
||||
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
|
||||
link: Link to external website for this part
|
||||
description: Descriptive notes field
|
||||
@ -261,7 +261,14 @@ class SupplierPart(models.Model):
|
||||
|
||||
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'))
|
||||
|
||||
|
@ -90,6 +90,7 @@ class SupplierPartSerializer(InvenTreeModelSerializer):
|
||||
'supplier_logo',
|
||||
'SKU',
|
||||
'manufacturer',
|
||||
'manufacturer_name',
|
||||
'description',
|
||||
'MPN',
|
||||
'link',
|
||||
|
Loading…
Reference in New Issue
Block a user