2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Fixed spash page for customer index

Added 'notes' field to Part object
This commit is contained in:
Oliver
2018-04-18 01:44:55 +10:00
parent f66a751608
commit a4621295a6
13 changed files with 97 additions and 12 deletions

View File

@ -31,6 +31,7 @@ class EditPartForm(forms.ModelForm):
'trackable',
'purchaseable',
'salable',
'notes',
]

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('part', '0022_auto_20180417_0819'),
]
operations = [
migrations.AddField(
model_name='part',
name='notes',
field=models.TextField(blank=True),
),
]

View File

@ -139,6 +139,8 @@ class Part(models.Model):
# Can this part be sold to customers?
salable = models.BooleanField(default=False, help_text="Can this part be sold to customers?")
notes = models.TextField(blank=True)
def __str__(self):
if self.IPN:
return "{name} ({ipn})".format(

View File

@ -63,6 +63,13 @@
{% endif %}
</table>
{% if part.notes %}
<div class="panel panel-default">
<div class="panel-heading"><b>Notes</b></div>
<div class="panel-body">{{ part.notes }}</div>
</div>
{% endif %}
<div class='container-fluid'>
<a href="{% url 'part-edit' part.id %}"><button class="btn btn-info">Edit Part</button></a>
<a href="{% url 'part-delete' part.id %}"><button class="btn btn-danger">Delete Part</button></a>