2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Specify 'default' functions for 'reference' field in SalesOrder and PurchaseOrder

- Refactor CreatePurchaseOrder form
- Some migrations
This commit is contained in:
Oliver
2021-07-02 23:59:02 +10:00
parent 7e5c9aa043
commit 984828f3bb
15 changed files with 200 additions and 137 deletions

View File

@ -1,6 +1,38 @@
{% load i18n %}
{% load inventree_extras %}
// Create a new purchase order
function createPurchaseOrder(options={}) {
constructForm('{% url "api-po-list" %}', {
method: 'POST',
fields: {
reference: {
prefix: "{% settings_value 'PURCHASEORDER_REFERENCE_PREFIX' %}",
},
supplier: {
value: options.supplier,
},
description: {},
target_date: {
icon: 'fa-calendar-alt',
},
link: {
icon: 'fa-link',
},
responsible: {
icon: 'fa-user',
}
},
onSuccess: function(data) {
location.href = `/order/purchase-order/${data.pk}/`;
},
title: '{% trans "Create Purchase Order" %}',
});
}
function removeOrderRowFromOrderWizard(e) {
/* Remove a part selection from an order form. */