mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +00:00
Adds API endpoint for serialization of stock items
This commit is contained in:
@ -52,12 +52,39 @@
|
||||
loadStockTrackingTable,
|
||||
loadTableFilters,
|
||||
removeStockRow,
|
||||
serializeStockItem,
|
||||
stockItemFields,
|
||||
stockLocationFields,
|
||||
stockStatusCodes,
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Launches a modal form to serialize a particular StockItem
|
||||
*/
|
||||
|
||||
function serializeStockItem(pk, options={}) {
|
||||
|
||||
var url = `/api/stock/${pk}/serialize/`;
|
||||
|
||||
options.method = 'POST';
|
||||
options.title = '{% trans "Serialize Stock Item" %}';
|
||||
|
||||
options.fields = {
|
||||
quantity: {},
|
||||
serial_numbers: {
|
||||
icon: 'fa-hashtag',
|
||||
},
|
||||
destination: {
|
||||
icon: 'fa-sitemap',
|
||||
},
|
||||
notes: {},
|
||||
}
|
||||
|
||||
constructForm(url, options);
|
||||
}
|
||||
|
||||
|
||||
function stockLocationFields(options={}) {
|
||||
var fields = {
|
||||
parent: {
|
||||
|
Reference in New Issue
Block a user