mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
@ -471,6 +471,12 @@ class StockList(generics.ListCreateAPIView):
|
||||
if sales_order:
|
||||
queryset = queryset.filter(sales_order=sales_order)
|
||||
|
||||
# Filter by customer
|
||||
customer = params.get('customer', None)
|
||||
|
||||
if customer:
|
||||
queryset = queryset.filter(customer=customer)
|
||||
|
||||
# Filter by "serialized" status?
|
||||
serialized = params.get('serialized', None)
|
||||
|
||||
|
24
InvenTree/stock/migrations/0046_auto_20200605_0931.py
Normal file
24
InvenTree/stock/migrations/0046_auto_20200605_0931.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Generated by Django 3.0.5 on 2020-06-05 09:31
|
||||
|
||||
import InvenTree.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0045_stockitem_customer'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stocklocation',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, help_text='Description', max_length=250),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='stocklocation',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Name', max_length=100, validators=[InvenTree.validators.validate_tree_name]),
|
||||
),
|
||||
]
|
18
InvenTree/stock/migrations/0047_auto_20200605_0932.py
Normal file
18
InvenTree/stock/migrations/0047_auto_20200605_0932.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.5 on 2020-06-05 09:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0046_auto_20200605_0931'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stocklocation',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, help_text='Description (optional)', max_length=250),
|
||||
),
|
||||
]
|
@ -140,6 +140,7 @@ class StockItem(MPTTModel):
|
||||
sales_order=None,
|
||||
build_order=None,
|
||||
belongs_to=None,
|
||||
status__in=StockStatus.AVAILABLE_CODES
|
||||
)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user