mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added URL field to stock item
This commit is contained in:
parent
835144c87f
commit
202a8e65b9
@ -49,5 +49,6 @@ class EditStockItemForm(forms.ModelForm):
|
||||
'batch',
|
||||
'quantity',
|
||||
'status',
|
||||
'customer'
|
||||
'customer',
|
||||
'URL',
|
||||
]
|
||||
|
20
InvenTree/stock/migrations/0008_stockitem_url.py
Normal file
20
InvenTree/stock/migrations/0008_stockitem_url.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2018-04-16 11:05
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0007_auto_20180416_0853'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='URL',
|
||||
field=models.URLField(blank=True, max_length=125),
|
||||
),
|
||||
]
|
@ -80,6 +80,9 @@ class StockItem(models.Model):
|
||||
# Optional serial number
|
||||
serial = models.PositiveIntegerField(blank=True, null=True)
|
||||
|
||||
# Optional URL to link to external resource
|
||||
URL = models.URLField(max_length=125, blank=True)
|
||||
|
||||
# Optional batch information
|
||||
batch = models.CharField(max_length=100, blank=True)
|
||||
|
||||
|
@ -44,6 +44,12 @@
|
||||
<td>Quantity</td>
|
||||
<td>{{ item.quantity }}</td>
|
||||
</tr>
|
||||
{% if item.URL %}
|
||||
<tr>
|
||||
<td>URL</td>
|
||||
<td><a href="{{ item.URL }}">{{ item.URL }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if item.supplier_part %}
|
||||
<tr>
|
||||
<td>Supplier Part</td>
|
||||
|
Loading…
Reference in New Issue
Block a user