mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
11d3975860
commit
d518739643
@ -135,7 +135,7 @@ class BuildItem(models.Model):
|
||||
def get_absolute_url(self):
|
||||
# TODO - Fix!
|
||||
return '/build/item/{pk}/'.format(pk=self.id)
|
||||
#return reverse('build-detail', kwargs={'pk': self.id})
|
||||
# return reverse('build-detail', kwargs={'pk': self.id})
|
||||
|
||||
class Meta:
|
||||
unique_together = [
|
||||
|
@ -12,7 +12,6 @@ from django.forms import HiddenInput
|
||||
|
||||
from part.models import Part
|
||||
from .models import Build, BuildItem
|
||||
from stock.models import StockItem
|
||||
from .forms import EditBuildForm, EditBuildItemForm
|
||||
|
||||
from InvenTree.views import AjaxView, AjaxUpdateView, AjaxCreateView, AjaxDeleteView
|
||||
@ -219,4 +218,4 @@ class BuildItemEdit(AjaxUpdateView):
|
||||
def get_data(self):
|
||||
return {
|
||||
'info': 'Updated Build Item',
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
function makeBuildTable(table, options) {
|
||||
function makeBuildTable(build_table, options) {
|
||||
/* Construct a table for allocation items to a build.
|
||||
* Each row contains a sub_part for the BOM.
|
||||
* Each row can be expended to allocate stock items against that part.
|
||||
@ -23,7 +23,6 @@ function makeBuildTable(table, options) {
|
||||
$("#part-table-" + row.pk),
|
||||
index,
|
||||
row,
|
||||
table,
|
||||
{
|
||||
build: options.build
|
||||
},
|
||||
@ -77,11 +76,11 @@ function makeBuildTable(table, options) {
|
||||
{
|
||||
part: options.part
|
||||
}).then(function(response) {
|
||||
table.bootstrapTable('load', response)
|
||||
});
|
||||
build_table.bootstrapTable('load', response);
|
||||
});
|
||||
|
||||
// Button callbacks
|
||||
table.on('click', '.new-item-button', function() {
|
||||
build_table.on('click', '.new-item-button', function() {
|
||||
var button = $(this);
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
@ -109,7 +108,7 @@ function makeAllocationTable(options) {
|
||||
return table;
|
||||
}
|
||||
|
||||
function fillAllocationTable(table, index, parent_row, parent_table, options) {
|
||||
function fillAllocationTable(table, index, parent_row, options) {
|
||||
/* Load data into an allocation table,
|
||||
* and update the total stock allocation count in the parent row.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user