Improved creation of purchase order line items from file upload

This commit is contained in:
eeintech 2021-08-12 14:27:00 -04:00
parent 1da004d30a
commit 9205d6d67c
5 changed files with 26 additions and 3 deletions

View File

@ -1037,6 +1037,11 @@ a.anchor {
height: 30px;
}
/* Force minimum width of number input fields to show at least ~5 digits */
input[type='number']{
min-width: 80px;
}
.search-menu {
padding-top: 2rem;
}

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.4 on 2021-08-12 17:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('company', '0040_alter_company_currency'),
('order', '0048_auto_20210702_2321'),
]
operations = [
migrations.AlterUniqueTogether(
name='purchaseorderlineitem',
unique_together={('order', 'part', 'quantity', 'purchase_price')},
),
]

View File

@ -729,7 +729,7 @@ class PurchaseOrderLineItem(OrderLineItem):
class Meta:
unique_together = (
('order', 'part')
('order', 'part', 'quantity', 'purchase_price')
)
def __str__(self):

View File

@ -115,7 +115,7 @@
{{ block.super }}
$('.bomselect').select2({
dropdownAutoWidth: true,
width: '100%',
matcher: partialMatcher,
});

View File

@ -327,7 +327,7 @@ $("#po-table").inventreeTable({
{
sortable: true,
sortName: 'part__MPN',
field: 'supplier_part_detail.MPN',
field: 'supplier_part_detail.manufacturer_part_detail.MPN',
title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) {
if (row.supplier_part_detail && row.supplier_part_detail.manufacturer_part) {