2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Add ability to quickly duplicate build orders (#3565)

* Adds ability to easily duplicate an existing build order

* Refactor purchase order editing code
This commit is contained in:
Oliver
2022-08-18 12:44:47 +10:00
committed by GitHub
parent 32b11ec5af
commit b70a0164ae
4 changed files with 117 additions and 53 deletions

View File

@ -219,28 +219,10 @@ $('#print-order-report').click(function() {
$("#edit-order").click(function() {
constructForm('{% url "api-po-detail" order.pk %}', {
fields: {
reference: {
icon: 'fa-hashtag',
},
{% if order.lines.count == 0 and order.status == PurchaseOrderStatus.PENDING %}
supplier: {
},
{% endif %}
supplier_reference: {},
description: {},
target_date: {
icon: 'fa-calendar-alt',
},
link: {
icon: 'fa-link',
},
responsible: {
icon: 'fa-user',
},
},
title: '{% trans "Edit Purchase Order" %}',
editPurchaseOrder({{ order.pk }}, {
{% if order.lines.count > 0 or order.status != PurchaseOrderStatus.PENDING %}
hide_supplier: true,
{% endif %}
reload: true,
});
});