diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 56d6474af2..487500e3d7 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -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 = [ diff --git a/InvenTree/build/views.py b/InvenTree/build/views.py index ab2c7d9484..07facc31f4 100644 --- a/InvenTree/build/views.py +++ b/InvenTree/build/views.py @@ -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', - } \ No newline at end of file + } diff --git a/InvenTree/static/script/inventree/build.js b/InvenTree/static/script/inventree/build.js index 5235e6eec0..a0b52d739a 100644 --- a/InvenTree/static/script/inventree/build.js +++ b/InvenTree/static/script/inventree/build.js @@ -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. *