2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 20:51:00 +00:00

Automatically associate ''filters' with relations

This commit is contained in:
Oliver
2021-06-28 20:13:18 +10:00
parent e585079779
commit f3ed05a09e
2 changed files with 45 additions and 5 deletions

View File

@ -40,12 +40,34 @@
$('#new-company-2').click(function() {
constructForm(
'{% url "api-company-list" %}',
'{% url "api-build-list" %}',
{
method: 'POST',
fields: [
'name',
'description',
title: '{% trans "Edit Part Details" %}',
fields: {
name: {
onEdit: function() {
console.log('Edited name field');
}
},
description: {},
category: {
filters: {
parent: 1,
},
secondary: {
label: '{% trans "New Category" %}',
},
},
active: {
onEdit: function() {
console.log('edited active field');
}
},
purchaseable: {},
salable: {},
component: {},
/*
'website',
'address',
'phone',
@ -54,7 +76,8 @@
'is_supplier',
'is_manufacturer',
'is_customer',
]
*/
}
}
);
});