Merge branch 'inventree:master' into webhooks

This commit is contained in:
Matthias Mair 2021-11-23 18:27:09 +01:00 committed by GitHub
commit 565fad30d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
113 changed files with 57442 additions and 55114 deletions

View File

@ -2,8 +2,7 @@
Pull rendered copies of the templated
"""
from django.http import response
from django.test import TestCase, testcases
from django.test import TestCase
from django.contrib.auth import get_user_model
import os

View File

@ -664,7 +664,7 @@ LANGUAGES = [
('el', _('Greek')),
('en', _('English')),
('es', _('Spanish')),
('es-mx', _('Spanish (Mexican')),
('es-mx', _('Spanish (Mexican)')),
('fr', _('French')),
('he', _('Hebrew')),
('it', _('Italian')),

View File

@ -2,14 +2,21 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='details' text="Build Order Details" icon="fa-info-circle" %}
{% trans "Build Order Details" as text %}
{% include "sidebar_item.html" with label='details' text=text icon="fa-info-circle" %}
{% if build.active %}
{% include "sidebar_item.html" with label='allocate' text="Allocate Stock" icon="fa-tasks" %}
{% trans "Allocate Stock" as text %}
{% include "sidebar_item.html" with label='allocate' text=text icon="fa-tasks" %}
{% endif %}
{% if not build.is_complete %}
{% include "sidebar_item.html" with label='outputs' text="Pending Items" icon="fa-tools" %}
{% trans "Pending Items" as text %}
{% include "sidebar_item.html" with label='outputs' text=text icon="fa-tools" %}
{% endif %}
{% include "sidebar_item.html" with label='completed' text="Completed Items" icon="fa-boxes" %}
{% include "sidebar_item.html" with label='children' text="Child Build Orders" icon="fa-sitemap" %}
{% include "sidebar_item.html" with label='attachments' text="Attachments" icon="fa-paperclip" %}
{% include "sidebar_item.html" with label='notes' text="Notes" icon="fa-clipboard" %}
{% trans "Completed Items" as text %}
{% include "sidebar_item.html" with label='completed' text=text icon="fa-boxes" %}
{% trans "Child Build Orders" as text %}
{% include "sidebar_item.html" with label='children' text=text icon="fa-sitemap" %}
{% trans "Attachments" as text %}
{% include "sidebar_item.html" with label='attachments' text=text icon="fa-paperclip" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label='notes' text=text icon="fa-clipboard" %}

View File

@ -116,7 +116,9 @@ class BaseInvenTreeSetting(models.Model):
for key, value in settings.items():
validator = cls.get_setting_validator(key)
if cls.validator_is_bool(validator):
if cls.is_protected(key):
value = '***'
elif cls.validator_is_bool(validator):
value = InvenTree.helpers.str2bool(value)
elif cls.validator_is_int(validator):
try:
@ -546,6 +548,19 @@ class BaseInvenTreeSetting(models.Model):
return value
@classmethod
def is_protected(cls, key):
"""
Check if the setting value is protected
"""
key = str(key).strip().upper()
if key in cls.GLOBAL_SETTINGS:
return cls.GLOBAL_SETTINGS[key].get('protected', False)
else:
return False
def settings_group_options():
"""build up group tuple for settings based on gour choices"""

View File

@ -45,6 +45,18 @@ class SettingsSerializer(InvenTreeModelSerializer):
return results
def get_value(self, obj):
"""
Make sure protected values are not returned
"""
result = obj.value
# never return protected values
if obj.is_protected:
result = '***'
return result
class GlobalSettingsSerializer(SettingsSerializer):
"""

View File

@ -2,5 +2,7 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='parameters' text="Parameters" icon="fa-th-list" %}
{% include "sidebar_item.html" with label='supplier-parts' text="Supplier Parts" icon="fa-building" %}
{% trans "Parameters" as text %}
{% include "sidebar_item.html" with label='parameters' text=text icon="fa-th-list" %}
{% trans "Supplier Parts" as text %}
{% include "sidebar_item.html" with label='supplier-parts' text=text icon="fa-building" %}

View File

@ -3,17 +3,24 @@
{% load inventree_extras %}
{% if company.is_manufacturer %}
{% include "sidebar_item.html" with label='manufacturer-parts' text="Manufactured Parts" icon="fa-industry" %}
{% trans "Manufactured Parts" as text %}
{% include "sidebar_item.html" with label='manufacturer-parts' text=text icon="fa-industry" %}
{% endif %}
{% if company.is_supplier %}
{% include "sidebar_item.html" with label='supplier-parts' text="Supplied Parts" icon="fa-building" %}
{% include "sidebar_item.html" with label='purchase-orders' text="Purchase Orders" icon="fa-shopping-cart" %}
{% trans "Supplied Parts" as text %}
{% include "sidebar_item.html" with label='supplier-parts' text=text icon="fa-building" %}
{% trans "Purchase Orders" as text %}
{% include "sidebar_item.html" with label='purchase-orders' text=text icon="fa-shopping-cart" %}
{% endif %}
{% if company.is_manufacturer or company.is_supplier %}
{% include "sidebar_item.html" with label='company-stock' text="Supplied Stock Items" icon="fa-boxes" %}
{% trans "Supplied Stock Items" as text %}
{% include "sidebar_item.html" with label='company-stock' text=text icon="fa-boxes" %}
{% endif %}
{% if company.is_customer %}
{% include "sidebar_item.html" with label='sales-orders' text="Sales Orders" icon="fa-truck" %}
{% include "sidebar_item.html" with label='assigned-stock' text="Assigned Stock Items" icon="fa-sign-out-alt" %}
{% trans "Sales Orders" as text %}
{% include "sidebar_item.html" with label='sales-orders' text=text icon="fa-truck" %}
{% trans "Assigned Stock Items" as text %}
{% include "sidebar_item.html" with label='assigned-stock' text=text icon="fa-sign-out-alt" %}
{% endif %}
{% include "sidebar_item.html" with label='company-notes' text="Notes" icon="fa-clipboard" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label='company-notes' text=text icon="fa-clipboard" %}

View File

@ -2,6 +2,9 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='stock' text="Stock Items" icon="fa-boxes" %}
{% include "sidebar_item.html" with label='purchase-orders' text="Purchase Orders" icon="fa-shopping-cart" %}
{% include "sidebar_item.html" with label='pricing' text="Supplier Part Pricing" icon="fa-dollar-sign" %}
{% trans "Stock Items" as text %}
{% include "sidebar_item.html" with label='stock' text=text icon="fa-boxes" %}
{% trans "Purchase Orders" as text %}
{% include "sidebar_item.html" with label='purchase-orders' text=text icon="fa-shopping-cart" %}
{% trans "Supplier Part Pricing" as text %}
{% include "sidebar_item.html" with label='pricing' text=text icon="fa-dollar-sign" %}

File diff suppressed because it is too large Load Diff

Binary file not shown.

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

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-19 07:42+1100\n"
"POT-Creation-Date: 2021-11-22 22:08+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -131,8 +131,8 @@ msgstr ""
msgid "File comment"
msgstr ""
#: InvenTree/models.py:118 InvenTree/models.py:119 common/models.py:1170
#: common/models.py:1171 part/models.py:2205 part/models.py:2225
#: InvenTree/models.py:118 InvenTree/models.py:119 common/models.py:1185
#: common/models.py:1186 part/models.py:2205 part/models.py:2225
#: report/templates/report/inventree_test_report_base.html:96
#: templates/js/translated/stock.js:2054
msgid "User"
@ -234,7 +234,7 @@ msgid "Spanish"
msgstr ""
#: InvenTree/settings.py:667
msgid "Spanish (Mexican"
msgid "Spanish (Mexican)"
msgstr ""
#: InvenTree/settings.py:668
@ -544,7 +544,7 @@ msgstr ""
#: build/forms.py:36 build/models.py:1283
#: build/templates/build/build_base.html:124
#: build/templates/build/detail.html:35 common/models.py:1210
#: build/templates/build/detail.html:35 common/models.py:1225
#: company/forms.py:42 company/templates/company/supplier_part.html:251
#: order/forms.py:102 order/models.py:729 order/models.py:991
#: order/templates/order/order_wizard/match_parts.html:30
@ -1454,688 +1454,688 @@ msgstr ""
msgid "Select {name} file to upload"
msgstr ""
#: common/models.py:338 common/models.py:955 common/models.py:1163
#: common/models.py:340 common/models.py:970 common/models.py:1178
msgid "Settings key (must be unique - case insensitive"
msgstr ""
#: common/models.py:340
#: common/models.py:342
msgid "Settings value"
msgstr ""
#: common/models.py:375
#: common/models.py:377
msgid "Must be an integer value"
msgstr ""
#: common/models.py:380
#: common/models.py:382
msgid "Chosen value is not a valid option"
msgstr ""
#: common/models.py:403
#: common/models.py:405
msgid "Value must be a boolean value"
msgstr ""
#: common/models.py:414
#: common/models.py:416
msgid "Value must be an integer value"
msgstr ""
#: common/models.py:437
#: common/models.py:439
msgid "Key string must be unique"
msgstr ""
#: common/models.py:544
#: common/models.py:559
msgid "No group"
msgstr ""
#: common/models.py:586
#: common/models.py:601
msgid "Restart required"
msgstr ""
#: common/models.py:587
#: common/models.py:602
msgid "A setting has been changed which requires a server restart"
msgstr ""
#: common/models.py:594
#: common/models.py:609
msgid "InvenTree Instance Name"
msgstr ""
#: common/models.py:596
#: common/models.py:611
msgid "String descriptor for the server instance"
msgstr ""
#: common/models.py:600
#: common/models.py:615
msgid "Use instance name"
msgstr ""
#: common/models.py:601
#: common/models.py:616
msgid "Use the instance name in the title-bar"
msgstr ""
#: common/models.py:607 company/models.py:100 company/models.py:101
#: common/models.py:622 company/models.py:100 company/models.py:101
msgid "Company name"
msgstr ""
#: common/models.py:608
#: common/models.py:623
msgid "Internal company name"
msgstr ""
#: common/models.py:613
#: common/models.py:628
msgid "Base URL"
msgstr ""
#: common/models.py:614
#: common/models.py:629
msgid "Base URL for server instance"
msgstr ""
#: common/models.py:620
#: common/models.py:635
msgid "Default Currency"
msgstr ""
#: common/models.py:621
#: common/models.py:636
msgid "Default currency"
msgstr ""
#: common/models.py:627
#: common/models.py:642
msgid "Download from URL"
msgstr ""
#: common/models.py:628
#: common/models.py:643
msgid "Allow download of remote images and files from external URL"
msgstr ""
#: common/models.py:634
#: common/models.py:649
msgid "Barcode Support"
msgstr ""
#: common/models.py:635
#: common/models.py:650
msgid "Enable barcode scanner support"
msgstr ""
#: common/models.py:641
#: common/models.py:656
msgid "IPN Regex"
msgstr ""
#: common/models.py:642
#: common/models.py:657
msgid "Regular expression pattern for matching Part IPN"
msgstr ""
#: common/models.py:646
#: common/models.py:661
msgid "Allow Duplicate IPN"
msgstr ""
#: common/models.py:647
#: common/models.py:662
msgid "Allow multiple parts to share the same IPN"
msgstr ""
#: common/models.py:653
#: common/models.py:668
msgid "Allow Editing IPN"
msgstr ""
#: common/models.py:654
#: common/models.py:669
msgid "Allow changing the IPN value while editing a part"
msgstr ""
#: common/models.py:660
#: common/models.py:675
msgid "Copy Part BOM Data"
msgstr ""
#: common/models.py:661
#: common/models.py:676
msgid "Copy BOM data by default when duplicating a part"
msgstr ""
#: common/models.py:667
#: common/models.py:682
msgid "Copy Part Parameter Data"
msgstr ""
#: common/models.py:668
#: common/models.py:683
msgid "Copy parameter data by default when duplicating a part"
msgstr ""
#: common/models.py:674
#: common/models.py:689
msgid "Copy Part Test Data"
msgstr ""
#: common/models.py:675
#: common/models.py:690
msgid "Copy test data by default when duplicating a part"
msgstr ""
#: common/models.py:681
#: common/models.py:696
msgid "Copy Category Parameter Templates"
msgstr ""
#: common/models.py:682
#: common/models.py:697
msgid "Copy category parameter templates when creating a part"
msgstr ""
#: common/models.py:688 part/models.py:2429 report/models.py:187
#: common/models.py:703 part/models.py:2429 report/models.py:187
#: templates/js/translated/table_filters.js:38
#: templates/js/translated/table_filters.js:367
msgid "Template"
msgstr ""
#: common/models.py:689
#: common/models.py:704
msgid "Parts are templates by default"
msgstr ""
#: common/models.py:695 part/models.py:888 templates/js/translated/bom.js:954
#: common/models.py:710 part/models.py:888 templates/js/translated/bom.js:954
#: templates/js/translated/table_filters.js:162
#: templates/js/translated/table_filters.js:379
msgid "Assembly"
msgstr ""
#: common/models.py:696
#: common/models.py:711
msgid "Parts can be assembled from other components by default"
msgstr ""
#: common/models.py:702 part/models.py:894
#: common/models.py:717 part/models.py:894
#: templates/js/translated/table_filters.js:383
msgid "Component"
msgstr ""
#: common/models.py:703
#: common/models.py:718
msgid "Parts can be used as sub-components by default"
msgstr ""
#: common/models.py:709 part/models.py:905
#: common/models.py:724 part/models.py:905
msgid "Purchaseable"
msgstr ""
#: common/models.py:710
#: common/models.py:725
msgid "Parts are purchaseable by default"
msgstr ""
#: common/models.py:716 part/models.py:910
#: common/models.py:731 part/models.py:910
#: templates/js/translated/table_filters.js:391
msgid "Salable"
msgstr ""
#: common/models.py:717
#: common/models.py:732
msgid "Parts are salable by default"
msgstr ""
#: common/models.py:723 part/models.py:900
#: common/models.py:738 part/models.py:900
#: templates/js/translated/table_filters.js:46
#: templates/js/translated/table_filters.js:94
#: templates/js/translated/table_filters.js:395
msgid "Trackable"
msgstr ""
#: common/models.py:724
#: common/models.py:739
msgid "Parts are trackable by default"
msgstr ""
#: common/models.py:730 part/models.py:920
#: common/models.py:745 part/models.py:920
#: part/templates/part/part_base.html:144
#: templates/js/translated/table_filters.js:42
msgid "Virtual"
msgstr ""
#: common/models.py:731
#: common/models.py:746
msgid "Parts are virtual by default"
msgstr ""
#: common/models.py:737
#: common/models.py:752
msgid "Show Import in Views"
msgstr ""
#: common/models.py:738
#: common/models.py:753
msgid "Display the import wizard in some part views"
msgstr ""
#: common/models.py:744
#: common/models.py:759
msgid "Show Price in Forms"
msgstr ""
#: common/models.py:745
#: common/models.py:760
msgid "Display part price in some forms"
msgstr ""
#: common/models.py:756
#: common/models.py:771
msgid "Show Price in BOM"
msgstr ""
#: common/models.py:757
#: common/models.py:772
msgid "Include pricing information in BOM tables"
msgstr ""
#: common/models.py:763
#: common/models.py:778
msgid "Show related parts"
msgstr ""
#: common/models.py:764
#: common/models.py:779
msgid "Display related parts for a part"
msgstr ""
#: common/models.py:770
#: common/models.py:785
msgid "Create initial stock"
msgstr ""
#: common/models.py:771
#: common/models.py:786
msgid "Create initial stock on part creation"
msgstr ""
#: common/models.py:777
#: common/models.py:792
msgid "Internal Prices"
msgstr ""
#: common/models.py:778
#: common/models.py:793
msgid "Enable internal prices for parts"
msgstr ""
#: common/models.py:784
#: common/models.py:799
msgid "Internal Price as BOM-Price"
msgstr ""
#: common/models.py:785
#: common/models.py:800
msgid "Use the internal price (if set) in BOM-price calculations"
msgstr ""
#: common/models.py:791
#: common/models.py:806
msgid "Part Name Display Format"
msgstr ""
#: common/models.py:792
#: common/models.py:807
msgid "Format to display the part name"
msgstr ""
#: common/models.py:799
#: common/models.py:814
msgid "Enable Reports"
msgstr ""
#: common/models.py:800
#: common/models.py:815
msgid "Enable generation of reports"
msgstr ""
#: common/models.py:806 templates/stats.html:25
#: common/models.py:821 templates/stats.html:25
msgid "Debug Mode"
msgstr ""
#: common/models.py:807
#: common/models.py:822
msgid "Generate reports in debug mode (HTML output)"
msgstr ""
#: common/models.py:813
#: common/models.py:828
msgid "Page Size"
msgstr ""
#: common/models.py:814
#: common/models.py:829
msgid "Default page size for PDF reports"
msgstr ""
#: common/models.py:824
#: common/models.py:839
msgid "Test Reports"
msgstr ""
#: common/models.py:825
#: common/models.py:840
msgid "Enable generation of test reports"
msgstr ""
#: common/models.py:831
#: common/models.py:846
msgid "Stock Expiry"
msgstr ""
#: common/models.py:832
#: common/models.py:847
msgid "Enable stock expiry functionality"
msgstr ""
#: common/models.py:838
#: common/models.py:853
msgid "Sell Expired Stock"
msgstr ""
#: common/models.py:839
#: common/models.py:854
msgid "Allow sale of expired stock"
msgstr ""
#: common/models.py:845
#: common/models.py:860
msgid "Stock Stale Time"
msgstr ""
#: common/models.py:846
#: common/models.py:861
msgid "Number of days stock items are considered stale before expiring"
msgstr ""
#: common/models.py:848
#: common/models.py:863
msgid "days"
msgstr ""
#: common/models.py:853
#: common/models.py:868
msgid "Build Expired Stock"
msgstr ""
#: common/models.py:854
#: common/models.py:869
msgid "Allow building with expired stock"
msgstr ""
#: common/models.py:860
#: common/models.py:875
msgid "Stock Ownership Control"
msgstr ""
#: common/models.py:861
#: common/models.py:876
msgid "Enable ownership control over stock locations and items"
msgstr ""
#: common/models.py:867
#: common/models.py:882
msgid "Group by Part"
msgstr ""
#: common/models.py:868
#: common/models.py:883
msgid "Group stock items by part reference in table views"
msgstr ""
#: common/models.py:874
#: common/models.py:889
msgid "Build Order Reference Prefix"
msgstr ""
#: common/models.py:875
#: common/models.py:890
msgid "Prefix value for build order reference"
msgstr ""
#: common/models.py:880
#: common/models.py:895
msgid "Build Order Reference Regex"
msgstr ""
#: common/models.py:881
#: common/models.py:896
msgid "Regular expression pattern for matching build order reference"
msgstr ""
#: common/models.py:885
#: common/models.py:900
msgid "Sales Order Reference Prefix"
msgstr ""
#: common/models.py:886
#: common/models.py:901
msgid "Prefix value for sales order reference"
msgstr ""
#: common/models.py:891
#: common/models.py:906
msgid "Purchase Order Reference Prefix"
msgstr ""
#: common/models.py:892
#: common/models.py:907
msgid "Prefix value for purchase order reference"
msgstr ""
#: common/models.py:898
#: common/models.py:913
msgid "Enable password forgot"
msgstr ""
#: common/models.py:899
#: common/models.py:914
msgid "Enable password forgot function on the login pages"
msgstr ""
#: common/models.py:904
#: common/models.py:919
msgid "Enable registration"
msgstr ""
#: common/models.py:905
#: common/models.py:920
msgid "Enable self-registration for users on the login pages"
msgstr ""
#: common/models.py:910
#: common/models.py:925
msgid "Enable SSO"
msgstr ""
#: common/models.py:911
#: common/models.py:926
msgid "Enable SSO on the login pages"
msgstr ""
#: common/models.py:916
#: common/models.py:931
msgid "Email required"
msgstr ""
#: common/models.py:917
#: common/models.py:932
msgid "Require user to supply mail on signup"
msgstr ""
#: common/models.py:922
#: common/models.py:937
msgid "Auto-fill SSO users"
msgstr ""
#: common/models.py:923
#: common/models.py:938
msgid "Automatically fill out user-details from SSO account-data"
msgstr ""
#: common/models.py:928
#: common/models.py:943
msgid "Mail twice"
msgstr ""
#: common/models.py:929
#: common/models.py:944
msgid "On signup ask users twice for their mail"
msgstr ""
#: common/models.py:934
#: common/models.py:949
msgid "Password twice"
msgstr ""
#: common/models.py:935
#: common/models.py:950
msgid "On signup ask users twice for their password"
msgstr ""
#: common/models.py:940
#: common/models.py:955
msgid "Group on signup"
msgstr ""
#: common/models.py:941
#: common/models.py:956
msgid "Group to which new users are assigned on registration"
msgstr ""
#: common/models.py:986
#: common/models.py:1001
msgid "Show subscribed parts"
msgstr ""
#: common/models.py:987
#: common/models.py:1002
msgid "Show subscribed parts on the homepage"
msgstr ""
#: common/models.py:992
#: common/models.py:1007
msgid "Show subscribed categories"
msgstr ""
#: common/models.py:993
#: common/models.py:1008
msgid "Show subscribed part categories on the homepage"
msgstr ""
#: common/models.py:998
#: common/models.py:1013
msgid "Show latest parts"
msgstr ""
#: common/models.py:999
#: common/models.py:1014
msgid "Show latest parts on the homepage"
msgstr ""
#: common/models.py:1004
#: common/models.py:1019
msgid "Recent Part Count"
msgstr ""
#: common/models.py:1005
#: common/models.py:1020
msgid "Number of recent parts to display on index page"
msgstr ""
#: common/models.py:1011
#: common/models.py:1026
msgid "Show unvalidated BOMs"
msgstr ""
#: common/models.py:1012
#: common/models.py:1027
msgid "Show BOMs that await validation on the homepage"
msgstr ""
#: common/models.py:1017
#: common/models.py:1032
msgid "Show recent stock changes"
msgstr ""
#: common/models.py:1018
#: common/models.py:1033
msgid "Show recently changed stock items on the homepage"
msgstr ""
#: common/models.py:1023
#: common/models.py:1038
msgid "Recent Stock Count"
msgstr ""
#: common/models.py:1024
#: common/models.py:1039
msgid "Number of recent stock items to display on index page"
msgstr ""
#: common/models.py:1029
#: common/models.py:1044
msgid "Show low stock"
msgstr ""
#: common/models.py:1030
#: common/models.py:1045
msgid "Show low stock items on the homepage"
msgstr ""
#: common/models.py:1035
#: common/models.py:1050
msgid "Show depleted stock"
msgstr ""
#: common/models.py:1036
#: common/models.py:1051
msgid "Show depleted stock items on the homepage"
msgstr ""
#: common/models.py:1041
#: common/models.py:1056
msgid "Show needed stock"
msgstr ""
#: common/models.py:1042
#: common/models.py:1057
msgid "Show stock items needed for builds on the homepage"
msgstr ""
#: common/models.py:1047
#: common/models.py:1062
msgid "Show expired stock"
msgstr ""
#: common/models.py:1048
#: common/models.py:1063
msgid "Show expired stock items on the homepage"
msgstr ""
#: common/models.py:1053
#: common/models.py:1068
msgid "Show stale stock"
msgstr ""
#: common/models.py:1054
#: common/models.py:1069
msgid "Show stale stock items on the homepage"
msgstr ""
#: common/models.py:1059
#: common/models.py:1074
msgid "Show pending builds"
msgstr ""
#: common/models.py:1060
#: common/models.py:1075
msgid "Show pending builds on the homepage"
msgstr ""
#: common/models.py:1065
#: common/models.py:1080
msgid "Show overdue builds"
msgstr ""
#: common/models.py:1066
#: common/models.py:1081
msgid "Show overdue builds on the homepage"
msgstr ""
#: common/models.py:1071
#: common/models.py:1086
msgid "Show outstanding POs"
msgstr ""
#: common/models.py:1072
#: common/models.py:1087
msgid "Show outstanding POs on the homepage"
msgstr ""
#: common/models.py:1077
#: common/models.py:1092
msgid "Show overdue POs"
msgstr ""
#: common/models.py:1078
#: common/models.py:1093
msgid "Show overdue POs on the homepage"
msgstr ""
#: common/models.py:1083
#: common/models.py:1098
msgid "Show outstanding SOs"
msgstr ""
#: common/models.py:1084
#: common/models.py:1099
msgid "Show outstanding SOs on the homepage"
msgstr ""
#: common/models.py:1089
#: common/models.py:1104
msgid "Show overdue SOs"
msgstr ""
#: common/models.py:1090
#: common/models.py:1105
msgid "Show overdue SOs on the homepage"
msgstr ""
#: common/models.py:1096
#: common/models.py:1111
msgid "Inline label display"
msgstr ""
#: common/models.py:1097
#: common/models.py:1112
msgid "Display PDF labels in the browser, instead of downloading as a file"
msgstr ""
#: common/models.py:1103
#: common/models.py:1118
msgid "Inline report display"
msgstr ""
#: common/models.py:1104
#: common/models.py:1119
msgid "Display PDF reports in the browser, instead of downloading as a file"
msgstr ""
#: common/models.py:1110
#: common/models.py:1125
msgid "Search Preview Results"
msgstr ""
#: common/models.py:1111
#: common/models.py:1126
msgid "Number of results to show in search preview window"
msgstr ""
#: common/models.py:1117
#: common/models.py:1132
msgid "Search Show Stock"
msgstr ""
#: common/models.py:1118
#: common/models.py:1133
msgid "Display stock levels in search preview window"
msgstr ""
#: common/models.py:1124
#: common/models.py:1139
msgid "Hide Inactive Parts"
msgstr ""
#: common/models.py:1125
#: common/models.py:1140
msgid "Hide inactive parts in search preview window"
msgstr ""
#: common/models.py:1131
#: common/models.py:1146
msgid "Show Quantity in Forms"
msgstr ""
#: common/models.py:1132
#: common/models.py:1147
msgid "Display available part quantity in some forms"
msgstr ""
#: common/models.py:1138
#: common/models.py:1153
msgid "Escape Key Closes Forms"
msgstr ""
#: common/models.py:1139
#: common/models.py:1154
msgid "Use the escape key to close modal forms"
msgstr ""
#: common/models.py:1145
#: common/models.py:1160
msgid "Fixed Navbar"
msgstr ""
#: common/models.py:1146
#: common/models.py:1161
msgid "InvenTree navbar position is fixed to the top of the screen"
msgstr ""
#: common/models.py:1211 company/forms.py:43
#: common/models.py:1226 company/forms.py:43
msgid "Price break quantity"
msgstr ""
#: common/models.py:1218 company/serializers.py:264
#: common/models.py:1233 company/serializers.py:264
#: company/templates/company/supplier_part.html:256
#: templates/js/translated/part.js:1508
msgid "Price"
msgstr ""
#: common/models.py:1219
#: common/models.py:1234
msgid "Unit price at specified quantity"
msgstr ""

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

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

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

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

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,8 @@
{% block sidebar %}
{% url "po-detail" order.id as url %}
{% include "sidebar_item.html" with url=url text="Return to Orders" icon="fa-undo" %}
{% trans "Return to Orders" as text %}
{% include "sidebar_item.html" with url=url text=text icon="fa-undo" %}
{% endblock %}
{% block page_content %}

View File

@ -2,7 +2,11 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='order-items' text="Line Items" icon="fa-list-ol" %}
{% include "sidebar_item.html" with label='received-items' text="Received Stock" icon="fa-sign-in-alt" %}
{% include "sidebar_item.html" with label='order-attachments' text="Attachments" icon="fa-paperclip" %}
{% include "sidebar_item.html" with label='order-notes' text="Notes" icon="fa-clipboard" %}
{% trans "Line Items" as text %}
{% include "sidebar_item.html" with label='order-items' text=text icon="fa-list-ol" %}
{% trans "Received Stock" as text %}
{% include "sidebar_item.html" with label='received-items' text=text icon="fa-sign-in-alt" %}
{% trans "Attachments" as text %}
{% include "sidebar_item.html" with label='order-attachments' text=text icon="fa-paperclip" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label='order-notes' text=text icon="fa-clipboard" %}

View File

@ -2,7 +2,11 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='order-items' text="Line Items" icon="fa-list-ol" %}
{% include "sidebar_item.html" with label='order-builds' text="Build Orders" icon="fa-tools" %}
{% include "sidebar_item.html" with label='order-attachments' text="Attachments" icon="fa-paperclip" %}
{% include "sidebar_item.html" with label='order-notes' text="Notes" icon="fa-clipboard" %}
{% trans "Line Items" as text %}
{% include "sidebar_item.html" with label='order-items' text=text icon="fa-list-ol" %}
{% trans "Build Orders" as text %}
{% include "sidebar_item.html" with label='order-builds' text=text icon="fa-tools" %}
{% trans "Attachments" as text %}
{% include "sidebar_item.html" with label='order-attachments' text=text icon="fa-paperclip" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label='order-notes' text=text icon="fa-clipboard" %}

View File

@ -205,7 +205,7 @@ class BomItemResource(ModelResource):
# If we are not generating an "import" template,
# just return the complete list of fields
if not self.is_importing:
if not getattr(self, 'is_importing', False):
return fields
# Otherwise, remove some fields we are not interested in

View File

@ -59,7 +59,7 @@ def ExportBom(part, fmt='csv', cascade=False, max_levels=None, parameter_data=Fa
uids = []
def add_items(items, level, cascade):
def add_items(items, level, cascade=True):
# Add items at a given layer
for item in items:

View File

@ -1587,7 +1587,7 @@ class Part(MPTTModel):
# Exclude any parts that this part is used *in* (to prevent recursive BOMs)
used_in = self.get_used_in().all()
parts = parts.exclude(id__in=[item.part.id for item in used_in])
parts = parts.exclude(id__in=[part.id for part in used_in])
return parts

View File

@ -5,7 +5,8 @@
{% block sidebar %}
{% url "part-detail" part.id as url %}
{% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %}
{% trans "Return to BOM" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-undo" %}
{% endblock %}
{% block heading %}

View File

@ -4,12 +4,16 @@
{% settings_value 'PART_SHOW_IMPORT' as show_import %}
{% include "sidebar_item.html" with label="subcategories" text="Subcategories" icon="fa-sitemap" %}
{% include "sidebar_item.html" with label="parts" text="Parts" icon="fa-shapes" %}
{% trans "Subcategories" as text %}
{% include "sidebar_item.html" with label="subcategories" text=text icon="fa-sitemap" %}
{% trans "Parts" as text %}
{% include "sidebar_item.html" with label="parts" text=text icon="fa-shapes" %}
{% if show_import and user.is_staff and roles.part.add %}
{% url "part-import" as url %}
{% include "sidebar_link.html" with url=url text="Import Parts" icon="fa-file-upload" %}
{% trans "Import Parts" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-file-upload" %}
{% endif %}
{% if category %}
{% include "sidebar_item.html" with label="parameters" text="Parameters" icon="fa-tasks" %}
{% trans "Parameters" as text %}
{% include "sidebar_item.html" with label="parameters" text=text icon="fa-tasks" %}
{% endif %}

View File

@ -5,7 +5,8 @@
{% block sidebar %}
{% url 'part-index' as url %}
{% include "sidebar_link.html" with url=url text="Return to Parts" icon="fa-undo" %}
{% trans "Return to Parts" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-undo" %}
{% endblock %}
{% block content %}

View File

@ -5,34 +5,49 @@
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
{% settings_value 'PART_SHOW_RELATED' as show_related %}
{% include "sidebar_item.html" with label="part-details" text="Details" icon="fa-shapes" %}
{% include "sidebar_item.html" with label="part-parameters" text="Parameters" icon="fa-th-list" %}
{% trans "Details" as text %}
{% include "sidebar_item.html" with label="part-details" text=text icon="fa-shapes" %}
{% trans "Parameters" as text %}
{% include "sidebar_item.html" with label="part-parameters" text=text icon="fa-th-list" %}
{% if part.is_template %}
{% include "sidebar_item.html" with label="variants" text="Variants" icon="fa-shapes" %}
{% trans "Variants" as text %}
{% include "sidebar_item.html" with label="variants" text=text icon="fa-shapes" %}
{% endif %}
{% include "sidebar_item.html" with label="part-stock" text="Stock" icon="fa-boxes" %}
{% trans "Stock" as text %}
{% include "sidebar_item.html" with label="part-stock" text=text icon="fa-boxes" %}
{% if part.assembly %}
{% include "sidebar_item.html" with label="bom" text="Bill of Materials" icon="fa-list" %}
{% trans "Bill of Materials" as text %}
{% include "sidebar_item.html" with label="bom" text=text icon="fa-list" %}
{% if roles.build.view %}
{% include "sidebar_item.html" with label="build-orders" text="Build Orders" icon="fa-tools" %}
{% trans "Build Orders" as text %}
{% include "sidebar_item.html" with label="build-orders" text=text icon="fa-tools" %}
{% endif %}
{% endif %}
{% if part.component %}
{% include "sidebar_item.html" with label="used-in" text="Used In" icon="fa-layer-group" %}
{% trans "Used In" as text %}
{% include "sidebar_item.html" with label="used-in" text=text icon="fa-layer-group" %}
{% endif %}
{% include "sidebar_item.html" with label="pricing" text="Pricing" icon="fa-dollar-sign" %}
{% trans "Pricing" as text %}
{% include "sidebar_item.html" with label="pricing" text=text icon="fa-dollar-sign" %}
{% if part.purchaseable and roles.purchase_order.view %}
{% include "sidebar_item.html" with label="suppliers" text="Suppliers" icon="fa-building" %}
{% include "sidebar_item.html" with label="purchase-orders" text="Purchase Orders" icon="fa-shopping-cart" %}
{% trans "Suppliers" as text %}
{% include "sidebar_item.html" with label="suppliers" text=text icon="fa-building" %}
{% trans "Purchase Orders" as text %}
{% include "sidebar_item.html" with label="purchase-orders" text=text icon="fa-shopping-cart" %}
{% endif %}
{% if part.salable and roles.sales_order.view %}
{% include "sidebar_item.html" with label="sales-orders" text="Sales Orders" icon="fa-truck" %}
{% trans "Sales Orders" as text %}
{% include "sidebar_item.html" with label="sales-orders" text=text icon="fa-truck" %}
{% endif %}
{% if part.trackable %}
{% include "sidebar_item.html" with label="test-templates" text="Test Templates" icon="fa-vial" %}
{% trans "Test Templates" as text %}
{% include "sidebar_item.html" with label="test-templates" text=text icon="fa-vial" %}
{% endif %}
{% if show_related %}
{% include "sidebar_item.html" with label="related-parts" text="Related Parts" icon="fa-random" %}
{% trans "Related Parts" as text %}
{% include "sidebar_item.html" with label="related-parts" text=text icon="fa-random" %}
{% endif %}
{% include "sidebar_item.html" with label="part-attachments" text="Attachments" icon="fa-paperclip" %}
{% include "sidebar_item.html" with label="part-notes" text="Notes" icon="fa-clipboard" %}
{% trans "Attachments" as text %}
{% include "sidebar_item.html" with label="part-attachments" text=text icon="fa-paperclip" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %}

View File

@ -2,5 +2,7 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='sublocations' text="Sublocations" icon="fa-sitemap" %}
{% include "sidebar_item.html" with label='stock' text="Stock Items" icon="fa-boxes" %}
{% trans "Sublocations" as text %}
{% include "sidebar_item.html" with label='sublocations' text=text icon="fa-sitemap" %}
{% trans "Stock Items" as text %}
{% include "sidebar_item.html" with label='stock' text=text icon="fa-boxes" %}

View File

@ -2,15 +2,21 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='history' text="Stock Tracking" icon="fa-history" %}
{% trans "Stock Tracking" as text %}
{% include "sidebar_item.html" with label='history' text=text icon="fa-history" %}
{% if item.part.trackable %}
{% include "sidebar_item.html" with label='test-data' text="Test Data" icon="fa-vial" %}
{% trans "Test Data" as text %}
{% include "sidebar_item.html" with label='test-data' text=text icon="fa-vial" %}
{% endif %}
{% if item.part.assembly %}
{% include "sidebar_item.html" with label='installed-items' text="Installed Items" icon="fa-sign-in-alt" %}
{% trans "Installed Items" as text %}
{% include "sidebar_item.html" with label='installed-items' text=text icon="fa-sign-in-alt" %}
{% endif %}
{% if item.child_count > 0 %}
{% include "sidebar_item.html" with label='children' text="Child Items" icon="fa-sitemap" %}
{% trans "Child Items" as text %}
{% include "sidebar_item.html" with label='children' text=text icon="fa-sitemap" %}
{% endif %}
{% include "sidebar_item.html" with label='attachments' text="Attachments" icon="fa-paperclip" %}
{% include "sidebar_item.html" with label='notes' text="Notes" icon="fa-clipboard" %}
{% trans "Attachments" as text %}
{% include "sidebar_item.html" with label='attachments' text=text icon="fa-paperclip" %}
{% trans "Notes" as text %}
{% include "sidebar_item.html" with label='notes' text=text icon="fa-clipboard" %}

View File

@ -2,29 +2,48 @@
{% load static %}
{% load inventree_extras %}
{% include "sidebar_header.html" with text="User Settings" icon='fa-user' %}
{% trans "User Settings" as text %}
{% include "sidebar_header.html" with text=text icon='fa-user' %}
{% include "sidebar_item.html" with label='account' text="Account Settings" icon="fa-cog" %}
{% include "sidebar_item.html" with label='user-display' text="Display Settings" icon="fa-desktop" %}
{% include "sidebar_item.html" with label='user-home' text="Home Page" icon="fa-home" %}
{% include "sidebar_item.html" with label='user-search' text="Search Settings" icon="fa-search" %}
{% include "sidebar_item.html" with label='user-labels' text="Label Printing" icon="fa-tag" %}
{% include "sidebar_item.html" with label='user-reports' text="Reporting" icon="fa-file-pdf" %}
{% trans "Account Settings" as text %}
{% include "sidebar_item.html" with label='account' text=text icon="fa-cog" %}
{% trans "Display Settings" as text %}
{% include "sidebar_item.html" with label='user-display' text=text icon="fa-desktop" %}
{% trans "Home Page" as text %}
{% include "sidebar_item.html" with label='user-home' text=text icon="fa-home" %}
{% trans "Search Settings" as text %}
{% include "sidebar_item.html" with label='user-search' text=text icon="fa-search" %}
{% trans "Label Printing" as text %}
{% include "sidebar_item.html" with label='user-labels' text=text icon="fa-tag" %}
{% trans "Reporting" as text %}
{% include "sidebar_item.html" with label='user-reports' text=text icon="fa-file-pdf" %}
{% if user.is_staff %}
{% include "sidebar_header.html" with text="Global Settings" icon='fa-cogs' %}
{% trans "Global Settings" as text %}
{% include "sidebar_header.html" with text=text icon='fa-cogs' %}
{% include "sidebar_item.html" with label='server' text="Server Configuration" icon="fa-server" %}
{% include "sidebar_item.html" with label='login' text="Login Settings" icon="fa-fingerprint" %}
{% include "sidebar_item.html" with label='barcodes' text="Barcode Support" icon="fa-qrcode" %}
{% include "sidebar_item.html" with label='currencies' text="Currencies" icon="fa-dollar-sign" %}
{% include "sidebar_item.html" with label='reporting' text="Reporting" icon="fa-file-pdf" %}
{% include "sidebar_item.html" with label='parts' text="Parts" icon="fa-shapes" %}
{% include "sidebar_item.html" with label='category' text="Categories" icon="fa-sitemap" %}
{% include "sidebar_item.html" with label='stock' text="Stock" icon="fa-boxes" %}
{% include "sidebar_item.html" with label='build-order' text="Build Orders" icon="fa-tools" %}
{% include "sidebar_item.html" with label='purchase-order' text="Purchase Orders" icon="fa-shopping-cart" %}
{% include "sidebar_item.html" with label='sales-order' text="Sales Orders" icon="fa-truck" %}
{% trans "Server Configuration" as text %}
{% include "sidebar_item.html" with label='server' text=text icon="fa-server" %}
{% trans "Login Settings" as text %}
{% include "sidebar_item.html" with label='login' text=text icon="fa-fingerprint" %}
{% trans "Barcode Support" as text %}
{% include "sidebar_item.html" with label='barcodes' text=text icon="fa-qrcode" %}
{% trans "Currencies" as text %}
{% include "sidebar_item.html" with label='currencies' text=text icon="fa-dollar-sign" %}
{% trans "Reporting" as text %}
{% include "sidebar_item.html" with label='reporting' text=text icon="fa-file-pdf" %}
{% trans "Parts" as text %}
{% include "sidebar_item.html" with label='parts' text=text icon="fa-shapes" %}
{% trans "Categories" as text %}
{% include "sidebar_item.html" with label='category' text=text icon="fa-sitemap" %}
{% trans "Stock" as text %}
{% include "sidebar_item.html" with label='stock' text=text icon="fa-boxes" %}
{% trans "Build Orders" as text %}
{% include "sidebar_item.html" with label='build-order' text=text icon="fa-tools" %}
{% trans "Purchase Orders" as text %}
{% include "sidebar_item.html" with label='purchase-order' text=text icon="fa-shopping-cart" %}
{% trans "Sales Orders" as text %}
{% include "sidebar_item.html" with label='sales-order' text=text icon="fa-truck" %}
{% endif %}

View File

@ -1,8 +1,8 @@
{% load i18n %}
<span title='{% trans text %}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate bg-light" data-bs-parent="#sidebar">
<span title='{{ text }}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate bg-light" data-bs-parent="#sidebar">
<h6>
<i class="bi bi-bootstrap"></i>
{% if icon %}<span class='sidebar-item-icon fas {{ icon }}'></span>{% endif %}
{% if text %}<span class='sidebar-item-text' style='display: none;'>{% trans text %}</span>{% endif %}
{% if text %}<span class='sidebar-item-text' style='display: none;'>{{ text }}</span>{% endif %}
</h6>
</span>

View File

@ -1,8 +1,8 @@
{% load i18n %}
<a href="#" id='select-{{ label }}' title='{% trans text %}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate sidebar-selector" data-bs-parent="#sidebar">
<a href="#" id='select-{{ label }}' title='{{ text }}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate sidebar-selector" data-bs-parent="#sidebar">
<i class="bi bi-bootstrap"></i>
<span class='sidebar-item-icon fas {{ icon }}'></span>
<span class='sidebar-item-text' style='display: none;'>{% trans text %}</span>
<span class='sidebar-item-icon fas {{ icon|default:"fa-circle" }}'></span>
<span class='sidebar-item-text' style='display: none;'>{{ text }}</span>
{% if badge %}
<span id='sidebar-badge-{{ label }}' class='sidebar-item-badge badge rounded-pill badge-right bg-dark'>
<span class='fas fa-spin fa-spinner'></span>

View File

@ -1,4 +1,4 @@
{% load i18n %}
<a href="{{ url }}" class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate" data-bs-parent="#sidebar">
<i class="bi bi-bootstrap"></i><span class='sidebar-item-icon fas {{ icon }}'></span><span class='sidebar-item-text' style='display: none;'>{% trans text %}</span>
<i class="bi bi-bootstrap"></i><span class='sidebar-item-icon fas {{ icon }}'></span><span class='sidebar-item-text' style='display: none;'>{{ text }}</span>
</a>

View File

@ -5,6 +5,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Coverage Status](https://coveralls.io/repos/github/inventree/InvenTree/badge.svg)](https://coveralls.io/github/inventree/InvenTree)
[![Crowdin](https://badges.crowdin.net/inventree/localized.svg)](https://crowdin.com/project/inventree)
![PEP](https://github.com/inventree/inventree/actions/workflows/style.yaml/badge.svg)
![SQLite](https://github.com/inventree/inventree/actions/workflows/coverage.yaml/badge.svg)
![MySQL](https://github.com/inventree/inventree/actions/workflows/mysql.yaml/badge.svg)

View File

@ -1,26 +1,22 @@
[flake8]
ignore =
# - W293 - blank lines contain whitespace
W293,
# - W605 - invalid escape sequence
W605,
# - E501 - line too long (82 characters)
E501, E722,
E501,
# - E722 - do not use bare except
E722,
# - C901 - function is too complex
C901,
# - N802 - function name should be lowercase (In the future, we should conform to this!)
# - N802 - function name should be lowercase
# TODO (In the future, we should conform to this!)
N802,
# - N806 - variable should be lowercase
N806,
# - N812 - lowercase imported as non-lowercase
N812,
exclude = .git,__pycache__,*/migrations/*,*/lib/*,*/bin/*,*/media/*,*/static/*,*ci_*.py*
exclude = .git,__pycache__,*/migrations/*,*/lib/*,*/bin/*,*/media/*,*/static/*
max-complexity = 20
[coverage:run]
source = ./InvenTree
omit =
InvenTree/manage.py
InvenTree/setup.py
InvenTree/InvenTree/middleware.py
InvenTree/InvenTree/utils.py
InvenTree/InvenTree/wsgi.py
InvenTree/users/apps.py