mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Adds simply endpoint for BOM duplication
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
/* exported
|
||||
duplicateBom,
|
||||
duplicatePart,
|
||||
editCategory,
|
||||
editPart,
|
||||
@ -428,6 +429,29 @@ function toggleStar(options) {
|
||||
}
|
||||
|
||||
|
||||
/* Duplicate a BOM */
|
||||
function duplicateBom(part_id, options={}) {
|
||||
constructForm(`/api/part/${part_id}/copy-bom/`, {
|
||||
method: 'POST',
|
||||
fields: {
|
||||
part: {
|
||||
icon: 'fa-shapes',
|
||||
filters: {
|
||||
assembly: true,
|
||||
ancestor: part_id,
|
||||
}
|
||||
},
|
||||
remove_existing: {
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
confirm: true,
|
||||
title: '{% trans "Copy Bill of Materials" %}',
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function partStockLabel(part, options={}) {
|
||||
|
||||
if (part.in_stock) {
|
||||
|
Reference in New Issue
Block a user