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:
@ -31,6 +31,7 @@ class EditPartForm(forms.ModelForm):
|
||||
'trackable',
|
||||
'purchaseable',
|
||||
'salable',
|
||||
'notes',
|
||||
]
|
||||
|
||||
|
||||
|
20
InvenTree/part/migrations/0023_part_notes.py
Normal file
20
InvenTree/part/migrations/0023_part_notes.py
Normal 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),
|
||||
),
|
||||
]
|
@ -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(
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user