mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Fix duplicate serial number field (#334)
This commit is contained in:
@ -239,6 +239,9 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Launch a dialog form to create a new stock item
|
||||
*/
|
||||
Future<void> _newStockItem(BuildContext context) async {
|
||||
int pk = location?.pk ?? -1;
|
||||
|
||||
@ -246,12 +249,18 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
return;
|
||||
}
|
||||
|
||||
var fields = InvenTreeStockItem().formFields();
|
||||
|
||||
// Serial number field is not required here
|
||||
fields.remove("serial");
|
||||
|
||||
InvenTreeStockItem().createForm(
|
||||
context,
|
||||
L10().stockItemCreate,
|
||||
data: {
|
||||
"location": location != null ? pk : null,
|
||||
},
|
||||
fields: fields,
|
||||
onSuccess: (result) async {
|
||||
Map<String, dynamic> data = result as Map<String, dynamic>;
|
||||
|
||||
|
Reference in New Issue
Block a user