mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Add "description" field to extra line items (#4815)
This commit is contained in:
28
InvenTree/order/migrations/0094_auto_20230514_2331.py
Normal file
28
InvenTree/order/migrations/0094_auto_20230514_2331.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.19 on 2023-05-14 23:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('order', '0093_auto_20230426_0248'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='purchaseorderextraline',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, help_text='Line item description (optional)', max_length=250, verbose_name='Description'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='returnorderextraline',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, help_text='Line item description (optional)', max_length=250, verbose_name='Description'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='salesorderextraline',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, help_text='Line item description (optional)', max_length=250, verbose_name='Description'),
|
||||
),
|
||||
]
|
@ -1109,6 +1109,12 @@ class OrderExtraLine(OrderLineItem):
|
||||
"""Metaclass options. Abstract ensures no database table is created."""
|
||||
abstract = True
|
||||
|
||||
description = models.CharField(
|
||||
max_length=250, blank=True,
|
||||
verbose_name=_('Description'),
|
||||
help_text=_('Line item description (optional)')
|
||||
)
|
||||
|
||||
context = models.JSONField(
|
||||
blank=True, null=True,
|
||||
verbose_name=_('Context'),
|
||||
|
@ -147,6 +147,7 @@ class AbstractExtraLineMeta:
|
||||
|
||||
fields = [
|
||||
'pk',
|
||||
'description',
|
||||
'quantity',
|
||||
'reference',
|
||||
'notes',
|
||||
|
Reference in New Issue
Block a user