2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-21 06:16:29 +00:00

Merge remote-tracking branch 'inventree/master' into build-fixes

# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.mo
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/templates/js/bom.js
This commit is contained in:
Oliver Walters
2020-10-29 15:23:51 +11:00
15 changed files with 1001 additions and 732 deletions

View File

@ -461,8 +461,8 @@ class PartList(generics.ListCreateAPIView):
else:
queryset = queryset.exclude(pk__in=starred_parts)
# Cascade?
cascade = str2bool(params.get('cascade', None))
# Cascade? (Default = True)
cascade = str2bool(params.get('cascade', True))
# Does the user wish to filter by category?
cat_id = params.get('category', None)

View File

@ -15,7 +15,7 @@
<table class='table table-striped'>
<col width='25'>
<tr>
<td></td>
<td><span class='fas fa-font'></span></td>
<td><b>{% trans "Part name" %}</b></td>
<td>{{ part.name }}</td>
</tr>
@ -28,7 +28,7 @@
{% endif %}
{% if part.revision %}
<tr>
<td></td>
<td><span class='fas fa-code-branch'></span></td>
<td><b>{% trans "Revision" %}</b></td>
<td>{{ part.revision }}</td>
</tr>
@ -132,7 +132,9 @@
</div>
<div class='col-sm-6'>
<table class='table table-striped'>
<col width='25'>
<tr>
<td><span class='fas fa-ghost'%></span></td>
<td><b>{% trans "Virtual" %}</b></td>
<td>{% include "slide.html" with state=part.virtual field='virtual' %}</td>
{% if part.virtual %}
@ -142,6 +144,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-clone'></span></td>
<td><b>{% trans "Template" %}</b></td>
<td>{% include "slide.html" with state=part.is_template field='is_template' %}</td>
{% if part.is_template %}
@ -151,6 +154,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-tools'></span></td>
<td><b>{% trans "Assembly" %}</b></td>
<td>{% include "slide.html" with state=part.assembly field='assembly' %}</td>
{% if part.assembly %}
@ -160,6 +164,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-th'></span></td>
<td><b>{% trans "Component" %}</b></td>
<td>{% include "slide.html" with state=part.component field='component' %}</td>
{% if part.component %}
@ -169,6 +174,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-directions'></span></td>
<td><b>{% trans "Trackable" %}</b></td>
<td>{% include "slide.html" with state=part.trackable field='trackable' %}</td>
{% if part.trackable %}
@ -178,6 +184,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-shopping-cart'></span></td>
<td><b>{% trans "Purchaseable" %}</b></td>
<td>{% include "slide.html" with state=part.purchaseable field='purchaseable' %}</td>
{% if part.purchaseable %}
@ -187,6 +194,7 @@
{% endif %}
</tr>
<tr>
<td><span class='fas fa-dollar-sign'></span></td>
<td><b>{% trans "Salable" %}</b></td>
<td>{% include "slide.html" with state=part.salable field='salable' %}</td>
{% if part.salable %}
@ -196,6 +204,13 @@
{% endif %}
</tr>
<tr>
<td>
{% if part.active %}
<span class='fas fa-check-square'></span>
{% else %}
<span class='fas fa-times-square'></span>
{% endif %}
</td>
<td><b>{% trans "Active" %}</b></td>
<td>{% include "slide.html" with state=part.active field='active' disabled=False %}</td>
{% if part.active %}

View File

@ -16,10 +16,17 @@
<hr>
<div id='button-toolbar'>
<div class='btn-group'>
{% if part.is_template and part.active %}
<button class='btn btn-success' id='new-variant' title='{% trans "Create new variant" %}'>{% trans "New Variant" %}</button>
{% endif %}
<div class='button-toolbar container-fluid'>
<div class='btn-group' role='group'>
{% if part.is_template and part.active %}
<button class='btn btn-success' id='new-variant' title='{% trans "Create new variant" %}'>
<span class='fas fa-plus-circle'></span> {% trans "New Variant" %}
</button>
{% endif %}
</div>
<div class='filter-list' id='filter-list-variants'>
<!-- Empty div (will be filled out with available BOM filters) -->
</div>
</div>
</div>

View File

@ -2099,7 +2099,7 @@ class BomItemCreate(AjaxCreateView):
model = BomItem
form_class = part_forms.EditBomItemForm
ajax_template_name = 'modal_form.html'
ajax_form_title = _('Create BOM item')
ajax_form_title = _('Create BOM Item')
role_required = 'part.add'