2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Rename "manufacturer" to "manufacturer_name"

This commit is contained in:
Oliver Walters
2020-04-13 13:29:11 +10:00
parent 34abf34c0f
commit e9e734acce
5 changed files with 30 additions and 3 deletions

View File

@ -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'))