From 22e9290f54223a89d72feb9b90741a4977c34128 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 5 May 2018 01:37:21 +1000 Subject: [PATCH] Helper funcs for updating part and stock item --- InvenTree/static/script/inventree/api.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/InvenTree/static/script/inventree/api.js b/InvenTree/static/script/inventree/api.js index ea7ddb00c9..e2bd182845 100644 --- a/InvenTree/static/script/inventree/api.js +++ b/InvenTree/static/script/inventree/api.js @@ -85,4 +85,12 @@ function getStockLocations(filters={}) { function getCompanies(filters={}) { return inventreeGet('/api/company/', filters); +} + +function updateStockItem(pk, data, final=false) { + return inventreeUpdate('/api/stock/' + pk + '/', data, final); +} + +function updatePart(pk, data, final=false) { + return inventreeUpdate('/api/part/' + pk + '/', data, final); } \ No newline at end of file