mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix rendering of BOM table view
- Edit and delete rows now works
This commit is contained in:
parent
cec61655cf
commit
e57a8cdcd1
@ -337,7 +337,7 @@ class BomItem(models.Model):
|
||||
"""
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('bom-detail', kwargs={'pk': self.id})
|
||||
return reverse('bom-item-detail', kwargs={'pk': self.id})
|
||||
|
||||
# A link to the parent part
|
||||
# Each part will get a reverse lookup field 'bom_items'
|
||||
|
@ -127,8 +127,8 @@ function loadBomTable(table, options) {
|
||||
if (options.editable) {
|
||||
cols.push({
|
||||
formatter: function(value, row, index, field) {
|
||||
var bEdit = "<button class='btn btn-success bom-edit-button btn-sm' type='button' url='" + row.url + "edit'>Edit</button>";
|
||||
var bDelt = "<button class='btn btn-danger bom-delete-button btn-sm' type='button' url='" + row.url + "delete'>Delete</button>";
|
||||
var bEdit = "<button class='btn btn-success bom-edit-button btn-sm' type='button' url='/part/bom/" + row.pk + "/edit'>Edit</button>";
|
||||
var bDelt = "<button class='btn btn-danger bom-delete-button btn-sm' type='button' url='/part/bom/" + row.pk + "/delete'>Delete</button>";
|
||||
|
||||
return "<div class='btn-group'>" + bEdit + bDelt + "</div>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user