mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Python styling fixes
This commit is contained in:
parent
c5e17070fb
commit
d6750652f0
@ -35,6 +35,7 @@
|
||||
{
|
||||
field: 'part_detail',
|
||||
title: 'Part',
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
var html = imageHoverIcon(row.part_detail.image_url) + renderLink(value.full_name, value.url + 'bom/');
|
||||
|
||||
@ -48,8 +49,10 @@
|
||||
{
|
||||
field: 'part_detail.description',
|
||||
title: 'Description',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'quantity',
|
||||
title: 'Uses',
|
||||
}
|
||||
|
@ -24,9 +24,9 @@
|
||||
<table class='table table-striped table-condensed' id='variant-table' data-toolbar='#button-toolbar'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Variant</th>
|
||||
<th>Description</th>
|
||||
<th>Stock</th>
|
||||
<th data-sortable='true'>Variant</th>
|
||||
<th data-sortable='true'>Description</th>
|
||||
<th data-sortable='true'>Stock</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -11,7 +11,6 @@ from django.shortcuts import HttpResponseRedirect
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.views.generic import DetailView, ListView, FormView
|
||||
from django.views.generic.edit import FormMixin
|
||||
from django.forms.models import model_to_dict
|
||||
from django.forms import HiddenInput, CheckboxInput
|
||||
|
||||
@ -655,7 +654,7 @@ class BomUpload(FormView):
|
||||
During these steps, data are passed between the server/client as JSON objects.
|
||||
"""
|
||||
|
||||
template_name='part/bom_upload/upload_file.html'
|
||||
template_name = 'part/bom_upload/upload_file.html'
|
||||
|
||||
# Context data passed to the forms (initially empty, extracted from uploaded file)
|
||||
bom_headers = []
|
||||
@ -664,7 +663,6 @@ class BomUpload(FormView):
|
||||
missing_columns = []
|
||||
allowed_parts = []
|
||||
|
||||
|
||||
def get_success_url(self):
|
||||
part = self.get_object()
|
||||
return reverse('upload-bom', kwargs={'pk': part.id})
|
||||
@ -785,7 +783,6 @@ class BomUpload(FormView):
|
||||
|
||||
return self.render_to_response(self.get_context_data(form=form))
|
||||
|
||||
|
||||
def getColumnIndex(self, name):
|
||||
""" Return the index of the column with the given name.
|
||||
It named column is not found, return -1
|
||||
@ -798,7 +795,6 @@ class BomUpload(FormView):
|
||||
|
||||
return idx
|
||||
|
||||
|
||||
def preFillSelections(self):
|
||||
""" Once data columns have been selected, attempt to pre-select the proper data from the database.
|
||||
This function is called once the field selection has been validated.
|
||||
@ -851,8 +847,6 @@ class BomUpload(FormView):
|
||||
row['quantity'] = quantity
|
||||
row['part_options'] = [m['part'] for m in matches]
|
||||
|
||||
|
||||
|
||||
def extractDataFromFile(self, bom):
|
||||
""" Read data from the BOM file """
|
||||
|
||||
@ -935,9 +929,6 @@ class BomUpload(FormView):
|
||||
|
||||
for col_idx in sorted(row.keys()):
|
||||
|
||||
#if col_idx not in self.column_selections.keys():
|
||||
# continue
|
||||
|
||||
value = row[col_idx]
|
||||
items.append(value)
|
||||
|
||||
@ -980,7 +971,6 @@ class BomUpload(FormView):
|
||||
if col not in self.column_selections.values():
|
||||
self.missing_columns.append(col)
|
||||
|
||||
|
||||
def handleFieldSelection(self):
|
||||
""" Handle the output of the field selection form.
|
||||
Here the user is presented with the raw data and must select the
|
||||
|
Loading…
Reference in New Issue
Block a user