mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Expand possibilities for variant conversion
- Ref get_conversion_options
This commit is contained in:
@ -139,7 +139,7 @@
|
||||
<div class='btn-group'>
|
||||
<button id='stock-edit-actions' title='{% trans "Stock actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-tools'></span> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' role='menu'>
|
||||
{% if item.part.has_variants %}
|
||||
{% if item.part.can_convert %}
|
||||
<li><a href='#' id='stock-convert' title='{% trans "Convert to variant" %}'><span class='fas fa-screwdriver'></span> {% trans "Convert to variant" %}</a></li>
|
||||
{% endif %}
|
||||
{% if roles.stock.add %}
|
||||
|
@ -1373,7 +1373,7 @@ class StockItemConvert(AjaxUpdateView):
|
||||
form = super().get_form()
|
||||
item = self.get_object()
|
||||
|
||||
form.fields['part'].queryset = item.part.get_all_variants()
|
||||
form.fields['part'].queryset = item.part.get_conversion_options()
|
||||
|
||||
return form
|
||||
|
||||
|
Reference in New Issue
Block a user