Add (optional) URL to stock tracking info

This commit is contained in:
Oliver Walters 2019-07-15 22:33:00 +10:00
parent c9bee19b8a
commit d800ed715e
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.2 on 2019-07-15 11:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0007_auto_20190618_0042'),
]
operations = [
migrations.AddField(
model_name='stockitemtracking',
name='URL',
field=models.URLField(blank=True, help_text='Link to external page for further information'),
),
]

View File

@ -512,6 +512,7 @@ class StockItemTracking(models.Model):
date: Date that this tracking info was created
title: Title of this tracking info (generated by system)
notes: Associated notes (input by user)
URL: Optional URL to external page
user: The user associated with this tracking info
quantity: The StockItem quantity at this point in time
"""
@ -529,6 +530,8 @@ class StockItemTracking(models.Model):
notes = models.TextField(blank=True)
URL = models.URLField(blank=True, help_text='Link to external page for further information')
user = models.ForeignKey(User, on_delete=models.SET_NULL, blank=True, null=True)
system = models.BooleanField(default=False)