mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-06 05:30:56 +00:00
Add 'customer' field to StockItem
This commit is contained in:
@ -32,6 +32,7 @@ from InvenTree.status_codes import StockStatus
|
||||
from InvenTree.models import InvenTreeTree, InvenTreeAttachment
|
||||
from InvenTree.fields import InvenTreeURLField
|
||||
|
||||
from company import models as CompanyModels
|
||||
from part import models as PartModels
|
||||
|
||||
|
||||
@ -352,6 +353,16 @@ class StockItem(MPTTModel):
|
||||
help_text=_('Is this item installed in another item?')
|
||||
)
|
||||
|
||||
customer = models.ForeignKey(
|
||||
CompanyModels.Company,
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
limit_choices_to={'is_customer': True},
|
||||
related_name='assigned_stock',
|
||||
help_text=_("Customer"),
|
||||
verbose_name=_("Customer"),
|
||||
)
|
||||
|
||||
serial = models.PositiveIntegerField(
|
||||
verbose_name=_('Serial Number'),
|
||||
blank=True, null=True,
|
||||
|
Reference in New Issue
Block a user