2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Updated Part model

- Added 'default_location'
- Added 'default_supplier'
This commit is contained in:
Oliver
2018-04-17 18:23:24 +10:00
parent 45c5edee4d
commit 982803a0a7
6 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 08:12
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('stock', '0010_stockitem_build'),
('part', '0020_part_salable'),
]
operations = [
migrations.AddField(
model_name='part',
name='default_location',
field=models.ForeignKey(blank=True, help_text='Where is this item normally stored?', null=True, on_delete=django.db.models.deletion.SET_NULL, to='stock.StockLocation'),
),
]

View File

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 08:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('supplier', '0007_auto_20180416_1253'),
('part', '0021_part_default_location'),
]
operations = [
migrations.AddField(
model_name='part',
name='default_supplier',
field=models.ForeignKey(blank=True, help_text='Default supplier part', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='default_parts', to='supplier.SupplierPart'),
),
migrations.AlterField(
model_name='part',
name='default_location',
field=models.ForeignKey(blank=True, help_text='Where is this item normally stored?', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='default_parts', to='stock.StockLocation'),
),
]