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

Markdownify the 'notes' field for StockItem

- New tab interface for the StockItem page
- Display / editing of notes field with markdown
This commit is contained in:
Oliver Walters
2020-02-02 12:11:18 +11:00
parent 908e2ef8bc
commit 1bdcbd1974
9 changed files with 365 additions and 233 deletions

View File

@ -16,6 +16,8 @@ from django.contrib.auth.models import User
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from markdownx.models import MarkdownxField
from mptt.models import TreeForeignKey
from decimal import Decimal, InvalidOperation
@ -358,7 +360,7 @@ class StockItem(models.Model):
choices=StockStatus.items(),
validators=[MinValueValidator(0)])
notes = models.CharField(max_length=250, blank=True, help_text=_('Stock Item Notes'))
notes = MarkdownxField(blank=True, help_text=_('Stock Item Notes'))
# If stock item is incoming, an (optional) ETA field
# expected_arrival = models.DateField(null=True, blank=True)