2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-16 01:36:29 +00:00

Fix persist buttons (#4640)

Fixes "persist form" buttons for the following models:

- Part
- PartCategory
- StockItem
- StockLocation

Closes https://github.com/inventree/InvenTree/issues/4491
This commit is contained in:
Oliver
2023-04-20 22:12:43 +10:00
committed by GitHub
parent c64ff9d569
commit 7bc4de6a92
4 changed files with 36 additions and 16 deletions

View File

@@ -159,6 +159,9 @@ function createStockLocation(options={}) {
options.method = 'POST';
options.fields = stockLocationFields(options);
options.title = '{% trans "New Stock Location" %}';
options.persist = true;
options.persistMessage = '{% trans "Create another location after this one" %}';
options.successMessage = '{% trans "Stock location created" %}';
constructForm(url, options);
}
@@ -473,6 +476,10 @@ function createNewStockItem(options={}) {
options.create = true;
options.persist = true;
options.persistMessage = '{% trans "Create another item after this one" %}';
options.successMessage = '{% trans "Stock item created" %}';
options.fields = stockItemFields(options);
options.groups = stockItemGroups(options);