mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
7424cc1352
19
InvenTree/build/migrations/0010_auto_20200318_1027.py
Normal file
19
InvenTree/build/migrations/0010_auto_20200318_1027.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.9 on 2020-03-18 10:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('build', '0009_auto_20200210_1032'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='build',
|
||||||
|
name='part',
|
||||||
|
field=models.ForeignKey(help_text='Select part to build', limit_choices_to={'active': True, 'assembly': True, 'is_template': False, 'virtual': False}, on_delete=django.db.models.deletion.CASCADE, related_name='builds', to='part.Part'),
|
||||||
|
),
|
||||||
|
]
|
@ -58,7 +58,8 @@ class Build(models.Model):
|
|||||||
limit_choices_to={
|
limit_choices_to={
|
||||||
'is_template': False,
|
'is_template': False,
|
||||||
'assembly': True,
|
'assembly': True,
|
||||||
'active': True
|
'active': True,
|
||||||
|
'virtual': False,
|
||||||
},
|
},
|
||||||
help_text=_('Select part to build'),
|
help_text=_('Select part to build'),
|
||||||
)
|
)
|
||||||
|
24
InvenTree/part/migrations/0030_auto_20200318_1027.py
Normal file
24
InvenTree/part/migrations/0030_auto_20200318_1027.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 2.2.9 on 2020-03-18 10:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('part', '0029_auto_20200223_0901'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='bomitem',
|
||||||
|
name='part',
|
||||||
|
field=models.ForeignKey(help_text='Select parent part', limit_choices_to={'assembly': True, 'is_template': False}, on_delete=django.db.models.deletion.CASCADE, related_name='bom_items', to='part.Part'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='bomitem',
|
||||||
|
name='sub_part',
|
||||||
|
field=models.ForeignKey(help_text='Select part to be used in BOM', limit_choices_to={'component': True, 'is_template': False}, on_delete=django.db.models.deletion.CASCADE, related_name='used_in', to='part.Part'),
|
||||||
|
),
|
||||||
|
]
|
@ -1067,6 +1067,7 @@ class BomItem(models.Model):
|
|||||||
help_text=_('Select parent part'),
|
help_text=_('Select parent part'),
|
||||||
limit_choices_to={
|
limit_choices_to={
|
||||||
'assembly': True,
|
'assembly': True,
|
||||||
|
'is_template': False,
|
||||||
})
|
})
|
||||||
|
|
||||||
# A link to the child item (sub-part)
|
# A link to the child item (sub-part)
|
||||||
@ -1075,6 +1076,7 @@ class BomItem(models.Model):
|
|||||||
help_text=_('Select part to be used in BOM'),
|
help_text=_('Select part to be used in BOM'),
|
||||||
limit_choices_to={
|
limit_choices_to={
|
||||||
'component': True,
|
'component': True,
|
||||||
|
'is_template': False,
|
||||||
})
|
})
|
||||||
|
|
||||||
# Quantity required
|
# Quantity required
|
||||||
|
19
InvenTree/stock/migrations/0023_auto_20200318_1027.py
Normal file
19
InvenTree/stock/migrations/0023_auto_20200318_1027.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.9 on 2020-03-18 10:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('stock', '0022_auto_20200217_1109'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='stockitem',
|
||||||
|
name='part',
|
||||||
|
field=models.ForeignKey(help_text='Base part', limit_choices_to={'active': True, 'is_template': False, 'virtual': False}, on_delete=django.db.models.deletion.CASCADE, related_name='stock_items', to='part.Part'),
|
||||||
|
),
|
||||||
|
]
|
@ -307,6 +307,7 @@ class StockItem(MPTTModel):
|
|||||||
limit_choices_to={
|
limit_choices_to={
|
||||||
'is_template': False,
|
'is_template': False,
|
||||||
'active': True,
|
'active': True,
|
||||||
|
'virtual': False
|
||||||
})
|
})
|
||||||
|
|
||||||
supplier_part = models.ForeignKey('company.SupplierPart', blank=True, null=True, on_delete=models.SET_NULL,
|
supplier_part = models.ForeignKey('company.SupplierPart', blank=True, null=True, on_delete=models.SET_NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user