Add some more part slidies

This commit is contained in:
Oliver Walters 2020-05-17 17:05:04 +10:00
parent e30f6ec374
commit b9799e1824
2 changed files with 19 additions and 3 deletions

View File

@ -139,13 +139,11 @@ class EditPartForm(HelperForm):
'revision',
'keywords',
'variant_of',
'is_template',
'link',
'default_location',
'default_supplier',
'units',
'minimum_stock',
'active',
]

View File

@ -128,6 +128,15 @@
<td><i>{% trans "Part is not a virtual part" %}</i></td>
{% endif %}
</tr>
<tr>
<td><b>{% trans "Template" %}</b></td>
<td>{% include "slide.html" with state=part.is_template field='is_template' %}</td>
{% if part.is_template %}
<td>{% trans "Part is a template part (variants can be made from this part)" %}</td>
{% else %}
<td><i>{% trans "Part is not a template part" %}</i></td>
{% endif %}
</tr>
<tr>
<td><b>{% trans "Assembly" %}</b></td>
<td>{% include "slide.html" with state=part.assembly field='assembly' %}</td>
@ -173,6 +182,15 @@
<td><i>{% trans "Part cannot be sold to customers" %}</i></td>
{% endif %}
</tr>
<tr>
<td><b>{% trans "Active" %}</b></td>
<td>{% include "slide.html" with state=part.active field='active' %}</td>
{% if part.active %}
<td>{% trans "Part is active" %}</td>
{% else %}
<td><i>{% trans "Part is not active" %}</i></td>
{% endif %}
</tr>
</table>
</div>
</div>
@ -196,7 +214,7 @@
data[field] = checked;
// Update the particular field
inventreePut("/api/part/{{ part.id }}/",
inventreePut("{% url 'api-part-detail' part.id %}",
data,
{
method: 'PATCH',