mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #916 from SchrodingersGat/null-customer
StockItem: Allow customer field to be blank
This commit is contained in:
commit
852a680c09
20
InvenTree/stock/migrations/0049_auto_20200820_0454.py
Normal file
20
InvenTree/stock/migrations/0049_auto_20200820_0454.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.0.7 on 2020-08-20 04:54
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0023_auto_20200808_0715'),
|
||||
('stock', '0048_auto_20200807_2344'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='customer',
|
||||
field=models.ForeignKey(blank=True, help_text='Customer', limit_choices_to={'is_customer': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned_stock', to='company.Company', verbose_name='Customer'),
|
||||
),
|
||||
]
|
@ -348,7 +348,7 @@ class StockItem(MPTTModel):
|
||||
customer = models.ForeignKey(
|
||||
CompanyModels.Company,
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
null=True, blank=True,
|
||||
limit_choices_to={'is_customer': True},
|
||||
related_name='assigned_stock',
|
||||
help_text=_("Customer"),
|
||||
|
Loading…
Reference in New Issue
Block a user