2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

clear IPN field when duplicating part and PART_ALLOW_DUPLICATE_IPN is False (#4359) (#4365)

This commit is contained in:
simonkuehling
2023-02-19 21:17:00 +01:00
committed by GitHub
parent bf8a59c604
commit 2986f8d61a

View File

@ -414,6 +414,11 @@ function duplicatePart(pk, options={}) {
data.is_template = false; data.is_template = false;
} }
// Clear IPN field if PART_ALLOW_DUPLICATE_IPN is set to False
if (!global_settings['PART_ALLOW_DUPLICATE_IPN']) {
data.IPN = '';
}
constructForm('{% url "api-part-list" %}', { constructForm('{% url "api-part-list" %}', {
method: 'POST', method: 'POST',
fields: fields, fields: fields,