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

Extract "limit_choices_to" options for relatedfields

- Specify as 'filters' for 'related field' type
- Extremely handy to be able to filter AJAX requests in a DRY manner!
This commit is contained in:
Oliver
2021-06-28 21:29:51 +10:00
parent f3ed05a09e
commit ac7564d069
3 changed files with 19 additions and 14 deletions

View File

@ -45,6 +45,12 @@
method: 'POST',
title: '{% trans "Edit Part Details" %}',
fields: {
part: {
filters: {
}
},
quantity: {},
/*
name: {
onEdit: function() {
console.log('Edited name field');
@ -67,7 +73,6 @@
purchaseable: {},
salable: {},
component: {},
/*
'website',
'address',
'phone',