mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Add notes field to purchase order line item
This commit is contained in:
parent
d860336060
commit
fe5bb23d13
@ -47,5 +47,5 @@ class EditPurchaseOrderLineItemForm(HelperForm):
|
|||||||
'part',
|
'part',
|
||||||
'quantity',
|
'quantity',
|
||||||
'reference',
|
'reference',
|
||||||
'received'
|
'notes',
|
||||||
]
|
]
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 2.2.2 on 2019-06-13 11:54
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('order', '0009_auto_20190606_2133'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='purchaseorderlineitem',
|
||||||
|
name='notes',
|
||||||
|
field=models.CharField(blank=True, help_text='Line item notes', max_length=500),
|
||||||
|
),
|
||||||
|
]
|
@ -162,6 +162,8 @@ class OrderLineItem(models.Model):
|
|||||||
quantity = models.PositiveIntegerField(validators=[MinValueValidator(0)], default=1, help_text=_('Item quantity'))
|
quantity = models.PositiveIntegerField(validators=[MinValueValidator(0)], default=1, help_text=_('Item quantity'))
|
||||||
|
|
||||||
reference = models.CharField(max_length=100, blank=True, help_text=_('Line item reference'))
|
reference = models.CharField(max_length=100, blank=True, help_text=_('Line item reference'))
|
||||||
|
|
||||||
|
notes = models.CharField(max_length=500, blank=True, help_text=_('Line item notes'))
|
||||||
|
|
||||||
|
|
||||||
class PurchaseOrderLineItem(OrderLineItem):
|
class PurchaseOrderLineItem(OrderLineItem):
|
||||||
|
@ -82,6 +82,7 @@ InvenTree | {{ order }}
|
|||||||
{% if not order.status == OrderStatus.PENDING %}
|
{% if not order.status == OrderStatus.PENDING %}
|
||||||
<th data-field='received'>Received</th>
|
<th data-field='received'>Received</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<th data-field='notes'>Note</th>
|
||||||
<th data-field='buttons'></th>
|
<th data-field='buttons'></th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for line in order.lines.all %}
|
{% for line in order.lines.all %}
|
||||||
@ -103,13 +104,16 @@ InvenTree | {{ order }}
|
|||||||
{% if not order.status == OrderStatus.PENDING %}
|
{% if not order.status == OrderStatus.PENDING %}
|
||||||
<td>{{ line.received }}</td>
|
<td>{{ line.received }}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<td>
|
||||||
|
{{ line.notes }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button class='btn btn-default btn-edit' id='edit-line-item-{{ line.id }}' line='{{ line.id }}' title='Edit line item' onclick='editPurchaseOrderLineItem'>
|
<button class='btn btn-default btn-edit' id='edit-line-item-{{ line.id }} title='Edit line item' onclick='editPurchaseOrderLineItem()'>
|
||||||
<span class='glyphicon glyphicon-small glyphicon-edit'></span>
|
<span line='{{ line.id }}' class='glyphicon glyphicon-small glyphicon-edit'></span>
|
||||||
</button>
|
</button>
|
||||||
<button class='btn btn-default btn-remove' id='remove-line-item-{{ line.id }' title='Remove line item' type='button' onclick='removePurchaseOrderLineItem'>
|
<button class='btn btn-default btn-remove' id='remove-line-item-{{ line.id }' title='Remove line item' type='button' onclick='removePurchaseOrderLineItem()'>
|
||||||
<span class='glyphicon glyphicon-small glyphicon-remove'></span>
|
<span line='{{ line.id }}' class='glyphicon glyphicon-small glyphicon-remove'></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -171,4 +175,5 @@ $('#new-po-line').click(function() {
|
|||||||
$("#po-lines-table").bootstrapTable({
|
$("#po-lines-table").bootstrapTable({
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user