mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-13 08:21:26 +00:00
Updated Part model
- Added 'default_location' - Added 'default_supplier'
This commit is contained in:
@ -106,6 +106,18 @@ class Part(models.Model):
|
||||
|
||||
image = models.ImageField(upload_to=rename_part_image, max_length=255, null=True, blank=True)
|
||||
|
||||
default_location = models.ForeignKey('stock.StockLocation', on_delete=models.SET_NULL,
|
||||
blank=True, null=True,
|
||||
help_text='Where is this item normally stored?',
|
||||
related_name='default_parts')
|
||||
|
||||
# Default supplier part
|
||||
default_supplier = models.ForeignKey('supplier.SupplierPart',
|
||||
on_delete=models.SET_NULL,
|
||||
blank=True, null=True,
|
||||
help_text='Default supplier part',
|
||||
related_name='default_parts')
|
||||
|
||||
# Minimum "allowed" stock level
|
||||
minimum_stock = models.PositiveIntegerField(default=0, validators=[MinValueValidator(0)], help_text='Minimum allowed stock level')
|
||||
|
||||
|
Reference in New Issue
Block a user