mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Enable editing of "sales order" from build order
- Add a renderer for the sales order model
This commit is contained in:
parent
f610b5e171
commit
31665e3b8d
@ -43,7 +43,6 @@ function buildFormFields() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
sales_order: {
|
sales_order: {
|
||||||
hidden: true,
|
|
||||||
},
|
},
|
||||||
batch: {},
|
batch: {},
|
||||||
target_date: {},
|
target_date: {},
|
||||||
|
@ -1568,6 +1568,9 @@ function renderModelData(name, model, data, parameters, options) {
|
|||||||
case 'partparametertemplate':
|
case 'partparametertemplate':
|
||||||
renderer = renderPartParameterTemplate;
|
renderer = renderPartParameterTemplate;
|
||||||
break;
|
break;
|
||||||
|
case 'salesorder':
|
||||||
|
renderer = renderSalesOrder;
|
||||||
|
break;
|
||||||
case 'manufacturerpart':
|
case 'manufacturerpart':
|
||||||
renderer = renderManufacturerPart;
|
renderer = renderManufacturerPart;
|
||||||
break;
|
break;
|
||||||
|
@ -216,6 +216,26 @@ function renderOwner(name, data, parameters, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Renderer for "SalesOrder" model
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
function renderSalesOrder(name, data, parameters, options) {
|
||||||
|
var html = `<span>${data.reference}</span>`;
|
||||||
|
|
||||||
|
if (data.description) {
|
||||||
|
html += ` - <i>${data.description}</i>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
html += `
|
||||||
|
<span class='float-right'>
|
||||||
|
<small>
|
||||||
|
{% trans "Order ID" %}: ${data.pk}
|
||||||
|
</small>
|
||||||
|
</span>`;
|
||||||
|
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Renderer for "PartCategory" model
|
// Renderer for "PartCategory" model
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
function renderPartCategory(name, data, parameters, options) {
|
function renderPartCategory(name, data, parameters, options) {
|
||||||
|
Loading…
Reference in New Issue
Block a user