mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
More fixes
- Allow stock item creation for inactive parts - Better handling of successful stock item creation - Disable fields rather than hiding them
This commit is contained in:
20
InvenTree/stock/migrations/0067_alter_stockitem_part.py
Normal file
20
InvenTree/stock/migrations/0067_alter_stockitem_part.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.2.5 on 2021-11-04 12:40
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0074_partcategorystar'),
|
||||
('stock', '0066_stockitem_scheduled_for_deletion'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='part',
|
||||
field=models.ForeignKey(help_text='Base part', limit_choices_to={'virtual': False}, on_delete=django.db.models.deletion.CASCADE, related_name='stock_items', to='part.part', verbose_name='Base Part'),
|
||||
),
|
||||
]
|
@ -456,7 +456,6 @@ class StockItem(MPTTModel):
|
||||
verbose_name=_('Base Part'),
|
||||
related_name='stock_items', help_text=_('Base part'),
|
||||
limit_choices_to={
|
||||
'active': True,
|
||||
'virtual': False
|
||||
})
|
||||
|
||||
|
@ -308,7 +308,6 @@
|
||||
|
||||
$('#item-create').click(function () {
|
||||
createNewStockItem({
|
||||
table: '#stock-table',
|
||||
data: {
|
||||
{% if location %}
|
||||
location: {{ location.id }}
|
||||
|
Reference in New Issue
Block a user