mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +00:00
Add 'manufacturer' field to SupplierPart object
- ForeignKey link to Company model
This commit is contained in:
@ -265,7 +265,7 @@ class SupplierPart(models.Model):
|
||||
related_name='manufactured_parts',
|
||||
limit_choices_to={'is_manufacturer': True},
|
||||
help_text=_('Select manufacturer'),
|
||||
null=True, blank=True,
|
||||
null=True, blank=True
|
||||
)
|
||||
|
||||
manufacturer_name = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer'))
|
||||
@ -296,7 +296,7 @@ class SupplierPart(models.Model):
|
||||
items = []
|
||||
|
||||
if self.manufacturer:
|
||||
items.append(self.manufacturer)
|
||||
items.append(self.manufacturer.name)
|
||||
if self.MPN:
|
||||
items.append(self.MPN)
|
||||
|
||||
|
Reference in New Issue
Block a user