Merge branch 'master' of https://github.com/inventree/InvenTree into part-import

This commit is contained in:
Matthias 2021-06-06 17:46:33 +02:00
commit 5a869d247f
32 changed files with 4320 additions and 4103 deletions

View File

@ -957,3 +957,7 @@ input[type="date"].form-control, input[type="time"].form-control, input[type="da
.clip-btn:hover {
background: var(--label-grey);
}
.sidebar-icon {
min-width: 19px;
}

View File

@ -11,7 +11,7 @@
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Build Order Details" %}'>
<a href='{% url "build-detail" build.id %}'>
<span class='fas fa-info-circle'></span>
<span class='fas fa-info-circle sidebar-icon'></span>
{% trans "Details" %}
</a>
</li>
@ -20,7 +20,7 @@
<li class='list-group-item {% if tab == "allocate" %}active{% endif %}' title='{% trans "Allocate Stock" %}'>
<a href='{% url "build-allocate" build.id %}'>
<span class='fas fa-tools'></span>
<span class='fas fa-tools sidebar-icon'></span>
{% trans "Allocate Stock" %}
</a>
</li>
@ -28,28 +28,28 @@
<li class='list-group-item {% if tab == "output" %}active{% endif %}' title='{% trans "Build Outputs" %}'>
<a href='{% url "build-output" build.id %}'>
<span class='fas fa-box'></span>
<span class='fas fa-box sidebar-icon'></span>
{% trans "Build Outputs" %}
</a>
</li>
<li class='list-group-item {% if tab == "children" %}active{% endif %}' title='{% trans "Child Build Orders" %}'>
<a href='{% url "build-children" build.id %}'>
<span class='fas fa-sitemap'></span>
<span class='fas fa-sitemap sidebar-icon'></span>
{% trans "Child Builds" %}
</a>
</li>
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Attachments" %}'>
<a href='{% url "build-attachments" build.id %}'>
<span class='fas fa-paperclip'></span>
<span class='fas fa-paperclip sidebar-icon'></span>
{% trans "Attachments" %}
</a>
</li>
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Build Order Notes" %}'>
<a href='{% url "build-notes" build.id %}'>
<span class='fas fa-clipboard'></span>
<span class='fas fa-clipboard sidebar-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -710,7 +710,7 @@ class PriceBreak(models.Model):
price = MoneyField(
max_digits=19,
decimal_places=4,
default_currency='USD',
default_currency=currency_code_default(),
null=True,
verbose_name=_('Price'),
help_text=_('Unit price at specified quantity'),

View File

@ -14,7 +14,7 @@ import django.forms
import djmoney.settings
from djmoney.forms.fields import MoneyField
import common.settings
from common.settings import currency_code_default
from .models import Company
from .models import ManufacturerPart
@ -38,7 +38,7 @@ class EditCompanyForm(HelperForm):
label=_('Currency'),
help_text=_('Default currency used for this company'),
choices=[('', '----------')] + djmoney.settings.CURRENCY_CHOICES,
initial=common.settings.currency_code_default,
initial=currency_code_default,
)
class Meta:
@ -116,7 +116,7 @@ class EditSupplierPartForm(HelperForm):
single_pricing = MoneyField(
label=_('Single Price'),
default_currency='USD',
default_currency=currency_code_default(),
help_text=_('Single quantity price'),
decimal_places=4,
max_digits=19,

View File

@ -10,7 +10,7 @@
<li class='list-group-item {% if tab == "suppliers" %}active{% endif %}' title='{% trans "Supplier Parts" %}'>
<a href='{% url "manufacturer-part-suppliers" part.id %}'>
<span class='fas fa-building'></span>
<span class='fas fa-building sidebar-icon'></span>
{% trans "Suppliers" %}
</a>
</li>
@ -18,14 +18,14 @@
{% comment "for later" %}
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Manufacturer Part Stock" %}'>
<a href='{% url "manufacturer-part-stock" part.id %}'>
<span class='fas fa-boxes'></span>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock" %}
</a>
</li>
<li class='list-group-item {% if tab == "orders" %}active{% endif %}' title='{% trans "Manufacturer Part Orders" %}'>
<a href='{% url "manufacturer-part-orders" part.id %}'>
<span class='fas fa-shopping-cart'></span>
<span class='fas fa-shopping-cart sidebar-icon'></span>
{% trans "Orders" %}
</a>
</li>

View File

@ -11,7 +11,7 @@
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Company Details" %}'>
<a href='{% url "company-detail" company.id %}'>
<span class='fas fa-info-circle'></span>
<span class='fas fa-info-circle sidebar-icon'></span>
{% trans "Details" %}
</a>
</li>
@ -19,7 +19,7 @@
{% if company.is_manufacturer %}
<li class='list-group-item {% if tab == "manufacturer_parts" %}active{% endif %}' title='{% trans "Manufactured Parts" %}'>
<a href='{% url "company-detail-manufacturer-parts" company.id %}'>
<span class='fas fa-industry'></span>
<span class='fas fa-industry sidebar-icon'></span>
{% trans "Manufactured Parts" %}
</a>
</li>
@ -28,7 +28,7 @@
{% if company.is_supplier or company.is_manufacturer %}
<li class='list-group-item {% if tab == "supplier_parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
<a href='{% url "company-detail-supplier-parts" company.id %}'>
<span class='fas fa-building'></span>
<span class='fas fa-building sidebar-icon'></span>
{% trans "Supplied Parts" %}
</a>
</li>
@ -37,7 +37,7 @@
{% if company.is_manufacturer or company.is_supplier %}
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Stock Items" %}'>
<a href='{% url "company-detail-stock" company.id %}'>
<span class='fas fa-boxes'></span>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock" %}
</a>
</li>
@ -46,7 +46,7 @@
{% if company.is_supplier %}
<li class='list-group-item {% if tab == "po" %}active{% endif %}' title='{% trans "Sales Orders" %}'>
<a href='{% url "company-detail-purchase-orders" company.id %}'>
<span class='fas fa-shopping-cart'></span>
<span class='fas fa-shopping-cart sidebar-icon'></span>
{% trans "Purchase Orders" %}
</a>
</li>
@ -55,13 +55,13 @@
{% if company.is_customer %}
<li class='list-group-item {% if tab == "so" %}active{% endif %}' title='{% trans "Sales Orders" %}'>
<a href='{% url "company-detail-sales-orders" company.id %}'>
<span class='fas fa-truck'></span>
<span class='fas fa-truck sidebar-icon'></span>
{% trans "Sales Orders" %}
</a>
</li>
<li class='list-group-item {% if tab == "assigned" %}active{% endif %}' title='{% trans "Assigned Stock" %}'>
<a href='{% url "company-detail-assigned-stock" company.id %}'>
<span class='fas fa-sign-out-alt'></span>
<span class='fas fa-sign-out-alt sidebar-icon'></span>
{% trans "Assigned Stock" %}
</a>
</li>
@ -69,7 +69,7 @@
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' titl='{% trans "Notes" %}'>
<a href='{% url "company-notes" company.id %}'>
<span class='fas fa-clipboard'></span>
<span class='fas fa-clipboard sidebar-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -11,21 +11,21 @@
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Supplier Part Stock" %}'>
<a href='{% url "supplier-part-stock" part.id %}'>
<span class='fas fa-boxes'></span>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock" %}
</a>
</li>
<li class='list-group-item {% if tab == "orders" %}active{% endif %}' title='{% trans "Supplier Part Orders" %}'>
<a href='{% url "supplier-part-orders" part.id %}'>
<span class='fas fa-shopping-cart'></span>
<span class='fas fa-shopping-cart sidebar-icon'></span>
{% trans "Orders" %}
</a>
</li>
<li class='list-group-item {% if tab == "pricing" %}active{% endif %}' title='{% trans "Supplier Part Pricing" %}'>
<a href='{% url "supplier-part-pricing" part.id %}'>
<span class='fas fa-dollar-sign'></span>
<span class='fas fa-dollar-sign sidebar-icon'></span>
{% trans "Pricing" %}
</a>
</li>

View File

@ -40,7 +40,7 @@ $('#price-break-table').inventreeTable({
part: {{ part.id }},
},
url: "{% url 'api-part-supplier-price' %}",
onLoadSuccess: function() {
onPostBody: function() {
var table = $('#price-break-table');
table.find('.button-price-break-delete').click(function() {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,8 @@ from django.contrib.auth.models import User
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from common.settings import currency_code_default
from markdownx.models import MarkdownxField
from djmoney.models.fields import MoneyField
@ -664,7 +666,7 @@ class PurchaseOrderLineItem(OrderLineItem):
purchase_price = MoneyField(
max_digits=19,
decimal_places=4,
default_currency='USD',
default_currency=currency_code_default(),
null=True, blank=True,
verbose_name=_('Purchase Price'),
help_text=_('Unit purchase price'),
@ -693,7 +695,7 @@ class SalesOrderLineItem(OrderLineItem):
sale_price = MoneyField(
max_digits=19,
decimal_places=4,
default_currency='USD',
default_currency=currency_code_default(),
null=True, blank=True,
verbose_name=_('Sale Price'),
help_text=_('Unit sale price'),

View File

@ -11,33 +11,33 @@
</li>
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Purchase Order Details" %}'>
<a href='{% url "po-detail" order.id %}'>
<span class='fas fa-info-circle'></span>
<span class='fas fa-info-circle side-icon'></span>
{% trans "Details" %}
</a>
</li>
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
<li class='list-group-item {% if tab == "upload" %}active{% endif %}' title='{% trans "Upload File" %}'>
<a href='{% url "po-upload" order.id %}'>
<span class='fas fa-file-upload'></span>
<span class='fas fa-file-upload side-icon'></span>
{% trans "Upload File" %}
</a>
</li>
{% endif %}
<li class='list-group-item {% if tab == "received" %}active{% endif %}' title='{% trans "Received Stock Items" %}'>
<a href='{% url "po-received" order.id %}'>
<span class='fas fa-sign-in-alt'></span>
<span class='fas fa-sign-in-alt side-icon'></span>
{% trans "Received Items" %}
</a>
</li>
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Purchase Order Attachments" %}'>
<a href='{% url "po-attachments" order.id %}'>
<span class='fas fa-paperclip'></span>
<span class='fas fa-paperclip side-icon'></span>
{% trans "Attachments" %}
</a>
</li>
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Notes" %}'>
<a href='{% url "po-notes" order.id %}'>
<span class='fas fa-clipboard'></span>
<span class='fas fa-clipboard side-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -11,28 +11,28 @@
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Sales Order Details" %}'>
<a href='{% url "so-detail" order.id %}'>
<span class='fas fa-info-circle'></span>
<span class='fas fa-info-circle sidebar-icon'></span>
{% trans "Details" %}
</a>
</li>
<li class='list-group-item {% if tab == "builds" %}active{% endif %}' title='{% trans "Build Orders" %}'>
<a href='{% url "so-builds" order.id %}'>
<span class='fas fa-tools'></span>
<span class='fas fa-tools sidebar-icon'></span>
{% trans "Build Orders" %}
</a>
</li>
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Sales Order Attachments" %}'>
<a href='{% url "so-attachments" order.id %}'>
<span class='fas fa-paperclip'></span>
<span class='fas fa-paperclip sidebar-icon'></span>
{% trans "Attachments" %}
</a>
</li>
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Notes" %}'>
<a href='{% url "so-notes" order.id %}'>
<span class='fas fa-clipboard'></span>
<span class='fas fa-clipboard sidebar-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -17,7 +17,7 @@
{% else %}
<a href='{% url "category-index-subcategory" %}'>
{% endif %}
<span class='fas fa-sitemap'></span>
<span class='fas fa-sitemap sidebar-icon'></span>
{% trans "Subcategories" %}
</a>
</li>
@ -28,7 +28,7 @@
{% else %}
<a href='{% url "part-index" %}'>
{% endif %}
<span class='fas fa-shapes'></span>
<span class='fas fa-shapes sidebar-icon'></span>
{% trans "Parts" %}
</a>
</li>
@ -45,7 +45,7 @@
{% if category %}
<li class='list-group-item {% if tab == "parameters" %}active{% endif %}' title='{% trans "Parameters" %}'>
<a href='{% url "category-parametric" category.id %}'>
<span class='fas fa-tasks'></span>
<span class='fas fa-tasks sidebar-icon'></span>
{% trans "Parameters" %}
</a>
</li>

View File

@ -10,7 +10,7 @@
</li>
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Part Details" %}'>
<a href='{% url "part-detail" part.id %}'>
<span class='menu-tab-icon fas fa-info-circle'></span>
<span class='menu-tab-icon fas fa-info-circle sidebar-icon'></span>
<span class='tab-text'>
{% trans "Details" %}
</span>
@ -18,28 +18,28 @@
</li>
<li class='list-group-item {% if tab == "params" %}active{% endif %}' title='{% trans "Part Parameters" %}'>
<a href='{% url "part-params" part.id %}'>
<span class='menu-tab-icon fas fa-tasks'></span>
<span class='menu-tab-icon fas fa-tasks sidebar-icon'></span>
{% trans "Parameters" %}
</a>
</li>
{% if part.is_template %}
<li class='list-group-item {% if tab == "variants" %}active{% endif %}' title='{% trans "Part Variants" %}'>
<a href='{% url "part-variants" part.id %}'>
<span class='menu-tab-icon fas fa-shapes'></span>
<span class='menu-tab-icon fas fa-shapes sidebar-icon'></span>
{% trans "Variants" %}
</a>
</li>
{% endif %}
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Stock Items" %}'>
<a href='{% url "part-stock" part.id %}'>
<span class='menu-tab-icon fas fa-boxes'></span>
<span class='menu-tab-icon fas fa-boxes sidebar-icon'></span>
{% trans "Stock" %}
</a>
</li>
{% if part.component or part.salable %}
<li class='list-group-item {% if tab == "allocation" %}active{% endif %}' title='{% trans "Allocated Stock" %}'>
<a href='{% url "part-allocation" part.id %}'>
<span class='menu-tab-icon fas fa-sign-out-alt'></span>
<span class='menu-tab-icon fas fa-sign-out-alt sidebar-icon'></span>
{% trans "Allocations" %}
</a>
</li>
@ -47,14 +47,14 @@
{% if part.assembly %}
<li class='list-group-item {% if tab == "bom" %}active{% endif %}' title='{% trans "Bill of Materials" %}'>
<a href='{% url "part-bom" part.id %}'>
<span class='menu-tab-icon fas fa-list'></span>
<span class='menu-tab-icon fas fa-list sidebar-icon'></span>
{% trans "Bill of Materials" %}
</a>
</li>
{% if roles.build.view %}
<li class='list-group-item {% if tab == "build" %}active{% endif %}' title='{% trans "Build Orders" %}'>
<a href='{% url "part-build" part.id %}'>
<span class='menu-tab-icon fas fa-tools'></span>
<span class='menu-tab-icon fas fa-tools sidebar-icon'></span>
{% trans "Build Orders" %}
</a>
</li>
@ -63,7 +63,7 @@
{% if part.component %}
<li class='list-group-item {% if tab == "used" %}active{% endif %}' title='{% trans "Used In" %}'>
<a href='{% url "part-used-in" part.id %}'>
<span class='menu-tab-icon fas fa-layer-group'></span>
<span class='menu-tab-icon fas fa-layer-group sidebar-icon'></span>
{% trans "Used In" %}
</a>
</li>
@ -71,25 +71,25 @@
{% if part.purchaseable and roles.purchase_order.view %}
<li class='list-group-item {% if tab == "order-prices" %}active{% endif %}' title='{% trans "Order Price Information" %}'>
<a href='{% url "part-order-prices" part.id %}'>
<span class='menu-tab-icon fas fa-dollar-sign' style='width: 20px;'></span>
<span class='menu-tab-icon fas fa-dollar-sign sidebar-icon'></span>
{% trans "Order Price" %}
</a>
</li>
<li class='list-group-item {% if tab == "manufacturers" %}active{% endif %}' title='{% trans "Manufacturers" %}'>
<a href='{% url "part-manufacturers" part.id %}'>
<span class='menu-tab-icon fas fa-industry'></span>
<span class='menu-tab-icon fas fa-industry sidebar-icon'></span>
{% trans "Manufacturers" %}
</a>
</li>
<li class='list-group-item {% if tab == "suppliers" %}active{% endif %}' title='{% trans "Suppliers" %}'>
<a href='{% url "part-suppliers" part.id %}'>
<span class='menu-tab-icon fas fa-building'></span>
<span class='menu-tab-icon fas fa-building sidebar-icon'></span>
{% trans "Suppliers" %}
</a>
</li>
<li class='list-group-item {% if tab == "orders" %}active{% endif %}' title='{% trans "Purchase Orders" %}'>
<a href='{% url "part-orders" part.id %}'>
<span class='menu-tab-icon fas fa-shopping-cart'></span>
<span class='menu-tab-icon fas fa-shopping-cart sidebar-icon'></span>
{% trans "Purchase Orders" %}
</a>
</li>
@ -97,13 +97,13 @@
{% if part.salable and roles.sales_order.view %}
<li class='list-group-item {% if tab == "sales-prices" %}active{% endif %}' title='{% trans "Sales Price Information" %}'>
<a href='{% url "part-sale-prices" part.id %}'>
<span class='menu-tab-icon fas fa-dollar-sign' style='width: 20px;'></span>
<span class='menu-tab-icon fas fa-dollar-sign sidebar-icon'></span>
{% trans "Sale Price" %}
</a>
</li>
<li class='list-group-item {% if tab == "sales-orders" %}active{% endif %}' title='{% trans "Sales Orders" %}'>
<a href='{% url "part-sales-orders" part.id %}'>
<span class='menu-tab-icon fas fa-truck'></span>
<span class='menu-tab-icon fas fa-truck sidebar-icon'></span>
{% trans "Sales Orders" %}
</a>
</li>
@ -111,26 +111,26 @@
{% if part.trackable %}
<li class='list-group-item {% if tab == "tests" %}active{% endif %}' title='{% trans "Part Test Templates" %}'>
<a href='{% url "part-test-templates" part.id %}'>
<span class='menu-tab-icon fas fa-vial'></span>
<span class='menu-tab-icon fas fa-vial sidebar-icon'></span>
{% trans "Tests" %}
</a>
</li>
{% endif %}
<li class='list-group-item {% if tab == "related" %}active{% endif %}' title='{% trans "Related Parts" %}'>
<a href='{% url "part-related" part.id %}'>
<span class='menu-tab-icon fas fa-random'></span>
<span class='menu-tab-icon fas fa-random sidebar-icon'></span>
{% trans "Related Parts" %}
</a>
</li>
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Attachments" %}'>
<a href='{% url "part-attachments" part.id %}'>
<span class='menu-tab-icon fas fa-paperclip'></span>
<span class='menu-tab-icon fas fa-paperclip sidebar-icon'></span>
{% trans "Attachments" %}
</a>
</li>
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Part Notes" %}'>
<a href='{% url "part-notes" part.id %}'>
<span class='menu-tab-icon fas fa-clipboard'></span>
<span class='menu-tab-icon fas fa-clipboard sidebar-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -13,7 +13,7 @@
{% endblock %}
{% block details %}
{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %}
{% default_currency as currency %}
{% crispy form %}
@ -130,7 +130,7 @@ the part single price shown is the current price for that supplier part"></i></h
{% block js_ready %}
{{ block.super }}
{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %}
{% default_currency as currency %}
{% if price_history %}
var pricedata = {
labels: [

View File

@ -1,8 +1,9 @@
{% extends "modal_form.html" %}
{% load i18n %}
{% load i18n inventree_extras %}
{% block pre_form_content %}
{% default_currency as currency %}
<table class='table table-striped table-condensed table-price-two'>
<tr>
<td><b>{% trans 'Part' %}</b></td>

View File

@ -48,7 +48,7 @@ $('#price-break-table').inventreeTable({
part: {{ part.id }},
},
url: "{% url 'api-part-sale-price-list' %}",
onLoadSuccess: function() {
onPostBody: function() {
var table = $('#price-break-table');
table.find('.button-price-break-delete').click(function() {

View File

@ -18,6 +18,7 @@ from InvenTree import version, settings
import InvenTree.helpers
from common.models import InvenTreeSetting, ColorTheme
from common.settings import currency_code_default
register = template.Library()
@ -161,6 +162,12 @@ def inventree_credits_url(*args, **kwargs):
return "https://inventree.readthedocs.io/en/latest/credits/"
@register.simple_tag()
def default_currency(*args, **kwargs):
""" Returns the default currency code """
return currency_code_default()
@register.simple_tag()
def setting_object(key, *args, **kwargs):
"""

View File

@ -20,6 +20,8 @@ from django.contrib.auth.models import User
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from common.settings import currency_code_default
from markdownx.models import MarkdownxField
from mptt.models import MPTTModel, TreeForeignKey
@ -534,7 +536,7 @@ class StockItem(MPTTModel):
purchase_price = MoneyField(
max_digits=19,
decimal_places=4,
default_currency='USD',
default_currency=currency_code_default(),
blank=True,
null=True,
verbose_name=_('Purchase Price'),

View File

@ -14,7 +14,7 @@
{% else %}
<a href='{% url "stock-sublocations" %}'>
{% endif %}
<span class='fas fa-sitemap'></span>
<span class='fas fa-sitemap sidebar-icon'></span>
{% trans "Sublocations" %}
</a>
</li>
@ -25,7 +25,7 @@
{% else %}
<a href='{% url "stock-index" %}'>
{% endif %}
<span class='fas fa-boxes'></span>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock Items" %}
</a>
</li>

View File

@ -10,7 +10,7 @@
<li class='list-group-item {% if tab == "tracking" %}active{% endif %}' title='{% trans "Stock Item Tracking" %}'>
<a href='{% url "stock-item-detail" item.id %}'>
<span class='fas fa-history'></span>
<span class='fas fa-history sidebar-icon'></span>
{% trans "History" %}
</a>
</li>
@ -18,7 +18,7 @@
{% if item.part.trackable %}
<li class='list-group-item {% if tab == "tests" %}active{% endif %}' title='{% trans "Test Data" %}'>
<a href='{% url "stock-item-test-results" item.id %}'>
<span class='fas fa-vial'></span>
<span class='fas fa-vial sidebar-icon'></span>
{% trans "Test Data" %}
</a>
</li>
@ -26,7 +26,7 @@
{% if item.part.assembly %}
<li class='list-group-item {% if tab == "installed" %}active{% endif %}' title='{% trans "Installed Stock Items" %}'>
<a href='{% url "stock-item-installed" item.id %}'>
<span class='fas fa-sign-in-alt'></span>
<span class='fas fa-sign-in-alt sidebar-icon'></span>
{% trans "Installed Items" %}
</a>
</li>
@ -37,7 +37,7 @@
{% if item.child_count > 0 %}
<li class='list-group-item {% if tab == "children" %}active{% endif %}' title='{% trans "Child Items" %}'>
<a href='{% url "stock-item-children" item.id %}'>
<span class='fas fa-sitemap'></span>
<span class='fas fa-sitemap sidebar-icon'></span>
{% trans "Children" %}
</a>
</li>
@ -46,14 +46,14 @@
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Attachments" %}'>
<a href='{% url "stock-item-attachments" item.id %}'>
<span class='fas fa-paperclip'></span>
<span class='fas fa-paperclip sidebar-icon'></span>
{% trans "Attachments" %}
</a>
</li>
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Stock Item Notes" %}'>
<a href='{% url "stock-item-notes" item.id %}'>
<span class='fas fa-clipboard'></span>
<span class='fas fa-clipboard sidebar-icon'></span>
{% trans "Notes" %}
</a>
</li>

View File

@ -1 +1,2 @@
{% if currency %}{{ currency.symbol }}{% endif %}{{ price }}{% if currency %} {{ currency.suffix }}{% endif %}
{% load djmoney %}
{% money_localize price currency %}

View File

@ -1,6 +1,6 @@
invoke>=1.4.0 # Invoke build tool
wheel>=0.34.2 # Wheel
Django==3.2 # Django package
Django==3.2.1 # Django package
pillow==8.1.1 # Image manipulation
djangorestframework==3.12.4 # DRF framework
django-cors-headers==3.2.0 # CORS headers extension for DRF
@ -11,9 +11,8 @@ django-markdownx==3.0.1 # Markdown form fields
django-markdownify==0.8.0 # Markdown rendering
coreapi==2.3.0 # API documentation
pygments==2.7.4 # Syntax highlighting
# tablib==0.13.0 # Import / export data files (installed as dependency of django-import-export package)
django-crispy-forms==1.11.2 # Form helpers
django-import-export==2.0.0 # Data import / export for admin interface
django-import-export==2.5.0 # Data import / export for admin interface
tablib[xls,xlsx,yaml] # Support for XLS and XLSX formats
django-cleanup==5.1.0 # Manage deletion of old / unused uploaded files
flake8==3.8.3 # PEP checking