mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Add function to get the default location for a part
- If field not specified, look at the part category
This commit is contained in:
@ -211,7 +211,7 @@ class StockItemCreate(AjaxCreateView):
|
||||
try:
|
||||
part = Part.objects.get(pk=part_id)
|
||||
initials['part'] = part
|
||||
initials['location'] = part.default_location
|
||||
initials['location'] = part.get_default_location()
|
||||
initials['supplier_part'] = part.default_supplier
|
||||
except Part.DoesNotExist:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user