mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 21:20:56 +00:00
Pass StockItem object through to the SerializeStock form
This commit is contained in:
@ -755,7 +755,18 @@ class StockItemSerialize(AjaxUpdateView):
|
||||
model = StockItem
|
||||
ajax_template_name = 'stock/item_serialize.html'
|
||||
ajax_form_title = _('Serialize Stock')
|
||||
form_class = SerializeStockForm
|
||||
#form_class = SerializeStockForm
|
||||
|
||||
def get_form(self):
|
||||
|
||||
context = self.get_form_kwargs()
|
||||
|
||||
# Pass the StockItem object through to the form
|
||||
context['item'] = self.get_object()
|
||||
|
||||
form = SerializeStockForm(**context)
|
||||
|
||||
return form
|
||||
|
||||
def get_initial(self):
|
||||
|
||||
|
Reference in New Issue
Block a user