mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add "description" field to extra line items (#4815)
This commit is contained in:
parent
caa7b84c3e
commit
3e0b57f10a
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."""
|
"""Metaclass options. Abstract ensures no database table is created."""
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
|
description = models.CharField(
|
||||||
|
max_length=250, blank=True,
|
||||||
|
verbose_name=_('Description'),
|
||||||
|
help_text=_('Line item description (optional)')
|
||||||
|
)
|
||||||
|
|
||||||
context = models.JSONField(
|
context = models.JSONField(
|
||||||
blank=True, null=True,
|
blank=True, null=True,
|
||||||
verbose_name=_('Context'),
|
verbose_name=_('Context'),
|
||||||
|
@ -147,6 +147,7 @@ class AbstractExtraLineMeta:
|
|||||||
|
|
||||||
fields = [
|
fields = [
|
||||||
'pk',
|
'pk',
|
||||||
|
'description',
|
||||||
'quantity',
|
'quantity',
|
||||||
'reference',
|
'reference',
|
||||||
'notes',
|
'notes',
|
||||||
|
@ -31,6 +31,7 @@ function extraLineFields(options={}) {
|
|||||||
},
|
},
|
||||||
quantity: {},
|
quantity: {},
|
||||||
reference: {},
|
reference: {},
|
||||||
|
description: {},
|
||||||
price: {
|
price: {
|
||||||
icon: 'fa-dollar-sign',
|
icon: 'fa-dollar-sign',
|
||||||
},
|
},
|
||||||
@ -272,6 +273,12 @@ function loadExtraLineTable(options={}) {
|
|||||||
title: '{% trans "Reference" %}',
|
title: '{% trans "Reference" %}',
|
||||||
switchable: false,
|
switchable: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
switchable: true,
|
||||||
|
field: 'description',
|
||||||
|
title: '{% trans "Description" %}',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
switchable: false,
|
switchable: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user