Merge pull request #562 from SchrodingersGat/stock-top-detail

Stock top detail
This commit is contained in:
Oliver 2019-09-27 10:18:50 +10:00 committed by GitHub
commit bed2cec5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 706 additions and 117 deletions

View File

@ -8,6 +8,14 @@ No pushing to master! New featues must be submitted in a separate branch (one br
Any required migration files **must** be included in the commit, or the pull-request will be rejected. If you change the underlying database schema, make sure you run `make migrate` and commit the migration files before submitting the PR. Any required migration files **must** be included in the commit, or the pull-request will be rejected. If you change the underlying database schema, make sure you run `make migrate` and commit the migration files before submitting the PR.
## Update Translation Files
Any PRs which update translatable strings (i.e. text strings that will appear in the web-front UI) must also update the translation (locale) files to include hooks for the translated strings.
*This does not mean that all translations must be provided, but that the translation files must include locations for the translated strings to be written.*
To perform this step, simply run `make_translate` from the top level directory before submitting the PR.
## Testing ## Testing
Any new code should be covered by unit tests - a submitted PR may not be accepted if the code coverage is decreased. Any new code should be covered by unit tests - a submitted PR may not be accepted if the code coverage is decreased.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-26 00:37+0000\n" "POT-Creation-Date: 2019-09-27 00:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -149,7 +149,7 @@ msgstr ""
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})" msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
msgstr "" msgstr ""
#: build/views.py:289 stock/views.py:831 #: build/views.py:289 stock/views.py:834
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -222,7 +222,7 @@ msgstr ""
msgid "Company" msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1030 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:437 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -345,32 +345,188 @@ msgstr ""
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "" msgstr ""
#: part/views.py:194 #: part/templates/part/category.html:13 part/templates/part/category.html:69
msgid "Part Categories"
msgstr ""
#: part/templates/part/category.html:14
msgid "All parts"
msgstr ""
#: part/templates/part/category.html:34
msgid "Category Details"
msgstr ""
#: part/templates/part/category.html:37
msgid "Category Path"
msgstr ""
#: part/templates/part/category.html:41
msgid "Category Description"
msgstr ""
#: part/templates/part/category.html:46 part/templates/part/detail.html:63
msgid "Default Location"
msgstr ""
#: part/templates/part/category.html:52 part/templates/part/detail.html:43
msgid "Keywords"
msgstr ""
#: part/templates/part/category.html:57
msgid "Subcategories"
msgstr ""
#: part/templates/part/category.html:61
msgid "Parts (Including subcategories)"
msgstr ""
#: part/templates/part/category.html:66 part/templates/part/detail.html:8
msgid "Part Details"
msgstr ""
#: part/templates/part/category.html:73
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""
#: part/templates/part/detail.html:27
msgid "Revision"
msgstr ""
#: part/templates/part/detail.html:32
msgid "Description"
msgstr ""
#: part/templates/part/detail.html:37
msgid "Variant Of"
msgstr ""
#: part/templates/part/detail.html:49
msgid "URL"
msgstr ""
#: part/templates/part/detail.html:54
msgid "Category"
msgstr ""
#: part/templates/part/detail.html:69
msgid "Default Supplier"
msgstr ""
#: part/templates/part/detail.html:76
msgid "Units"
msgstr ""
#: part/templates/part/detail.html:81
msgid "Minimum Stock"
msgstr ""
#: part/templates/part/detail.html:90
msgid "Virtual"
msgstr ""
#: part/templates/part/detail.html:93
msgid "Part is virtual (not a physical part)"
msgstr ""
#: part/templates/part/detail.html:95
msgid "Part is not a virtual part"
msgstr ""
#: part/templates/part/detail.html:99
msgid "Assembly"
msgstr ""
#: part/templates/part/detail.html:102
msgid "Part can be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:104
msgid "Part cannot be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:108
msgid "Component"
msgstr ""
#: part/templates/part/detail.html:111
msgid "Part can be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:113
msgid "Part cannot be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:117
msgid "Trackable"
msgstr ""
#: part/templates/part/detail.html:120
msgid "Part stock is tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:122
msgid "Part stock is not tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:126
msgid "Purchaseable"
msgstr ""
#: part/templates/part/detail.html:129 part/templates/part/detail.html:131
msgid "Part can be purchased from external suppliers"
msgstr ""
#: part/templates/part/detail.html:136
msgid "Sellable"
msgstr ""
#: part/templates/part/detail.html:139
msgid "Part can be sold to customers"
msgstr ""
#: part/templates/part/detail.html:141
msgid "Part cannot be sold to customers"
msgstr ""
#: part/templates/part/detail.html:151
msgid "Notes"
msgstr ""
#: part/views.py:196
#, python-brace-format #, python-brace-format
msgid "Set category for {n} parts" msgid "Set category for {n} parts"
msgstr "" msgstr ""
#: part/views.py:771 #: part/views.py:773
msgid "No BOM file provided" msgid "No BOM file provided"
msgstr "" msgstr ""
#: part/views.py:1032 #: part/views.py:1034
msgid "Enter a valid quantity" msgid "Enter a valid quantity"
msgstr "" msgstr ""
#: part/views.py:1056 part/views.py:1059 #: part/views.py:1058 part/views.py:1061
msgid "Select valid part" msgid "Select valid part"
msgstr "" msgstr ""
#: part/views.py:1065 #: part/views.py:1067
msgid "Duplicate part selected" msgid "Duplicate part selected"
msgstr "" msgstr ""
#: part/views.py:1093 #: part/views.py:1095
msgid "Select a part" msgid "Select a part"
msgstr "" msgstr ""
#: part/views.py:1097 #: part/views.py:1099
msgid "Specify quantity" msgid "Specify quantity"
msgstr "" msgstr ""
@ -459,51 +615,80 @@ msgstr ""
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
#: stock/views.py:396 #: stock/templates/stock/location.html:37
msgid "Location Details"
msgstr ""
#: stock/templates/stock/location.html:40
msgid "Location Path"
msgstr ""
#: stock/templates/stock/location.html:44
msgid "Location Description"
msgstr ""
#: stock/templates/stock/location.html:48
msgid "Sublocations"
msgstr ""
#: stock/templates/stock/location.html:52
#: stock/templates/stock/location.html:64
msgid "Stock Items"
msgstr ""
#: stock/templates/stock/location.html:57
msgid "Stock Details"
msgstr ""
#: stock/templates/stock/location.html:60
msgid "Stock Locations"
msgstr ""
#: stock/views.py:399
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:408 #: stock/views.py:411
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:416 #: stock/views.py:419
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:484 #: stock/views.py:487
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:499 #: stock/views.py:502
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:512 #: stock/views.py:515
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:540 #: stock/views.py:543
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:543 #: stock/views.py:546
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:810 #: stock/views.py:813
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:872 #: stock/views.py:875
msgid "Created new stock item" msgid "Created new stock item"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-26 00:37+0000\n" "POT-Creation-Date: 2019-09-27 00:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -149,7 +149,7 @@ msgstr ""
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})" msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
msgstr "" msgstr ""
#: build/views.py:289 stock/views.py:831 #: build/views.py:289 stock/views.py:834
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -222,7 +222,7 @@ msgstr ""
msgid "Company" msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1030 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:437 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -345,32 +345,188 @@ msgstr ""
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "" msgstr ""
#: part/views.py:194 #: part/templates/part/category.html:13 part/templates/part/category.html:69
msgid "Part Categories"
msgstr ""
#: part/templates/part/category.html:14
msgid "All parts"
msgstr ""
#: part/templates/part/category.html:34
msgid "Category Details"
msgstr ""
#: part/templates/part/category.html:37
msgid "Category Path"
msgstr ""
#: part/templates/part/category.html:41
msgid "Category Description"
msgstr ""
#: part/templates/part/category.html:46 part/templates/part/detail.html:63
msgid "Default Location"
msgstr ""
#: part/templates/part/category.html:52 part/templates/part/detail.html:43
msgid "Keywords"
msgstr ""
#: part/templates/part/category.html:57
msgid "Subcategories"
msgstr ""
#: part/templates/part/category.html:61
msgid "Parts (Including subcategories)"
msgstr ""
#: part/templates/part/category.html:66 part/templates/part/detail.html:8
msgid "Part Details"
msgstr ""
#: part/templates/part/category.html:73
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""
#: part/templates/part/detail.html:27
msgid "Revision"
msgstr ""
#: part/templates/part/detail.html:32
msgid "Description"
msgstr ""
#: part/templates/part/detail.html:37
msgid "Variant Of"
msgstr ""
#: part/templates/part/detail.html:49
msgid "URL"
msgstr ""
#: part/templates/part/detail.html:54
msgid "Category"
msgstr ""
#: part/templates/part/detail.html:69
msgid "Default Supplier"
msgstr ""
#: part/templates/part/detail.html:76
msgid "Units"
msgstr ""
#: part/templates/part/detail.html:81
msgid "Minimum Stock"
msgstr ""
#: part/templates/part/detail.html:90
msgid "Virtual"
msgstr ""
#: part/templates/part/detail.html:93
msgid "Part is virtual (not a physical part)"
msgstr ""
#: part/templates/part/detail.html:95
msgid "Part is not a virtual part"
msgstr ""
#: part/templates/part/detail.html:99
msgid "Assembly"
msgstr ""
#: part/templates/part/detail.html:102
msgid "Part can be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:104
msgid "Part cannot be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:108
msgid "Component"
msgstr ""
#: part/templates/part/detail.html:111
msgid "Part can be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:113
msgid "Part cannot be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:117
msgid "Trackable"
msgstr ""
#: part/templates/part/detail.html:120
msgid "Part stock is tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:122
msgid "Part stock is not tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:126
msgid "Purchaseable"
msgstr ""
#: part/templates/part/detail.html:129 part/templates/part/detail.html:131
msgid "Part can be purchased from external suppliers"
msgstr ""
#: part/templates/part/detail.html:136
msgid "Sellable"
msgstr ""
#: part/templates/part/detail.html:139
msgid "Part can be sold to customers"
msgstr ""
#: part/templates/part/detail.html:141
msgid "Part cannot be sold to customers"
msgstr ""
#: part/templates/part/detail.html:151
msgid "Notes"
msgstr ""
#: part/views.py:196
#, python-brace-format #, python-brace-format
msgid "Set category for {n} parts" msgid "Set category for {n} parts"
msgstr "" msgstr ""
#: part/views.py:771 #: part/views.py:773
msgid "No BOM file provided" msgid "No BOM file provided"
msgstr "" msgstr ""
#: part/views.py:1032 #: part/views.py:1034
msgid "Enter a valid quantity" msgid "Enter a valid quantity"
msgstr "" msgstr ""
#: part/views.py:1056 part/views.py:1059 #: part/views.py:1058 part/views.py:1061
msgid "Select valid part" msgid "Select valid part"
msgstr "" msgstr ""
#: part/views.py:1065 #: part/views.py:1067
msgid "Duplicate part selected" msgid "Duplicate part selected"
msgstr "" msgstr ""
#: part/views.py:1093 #: part/views.py:1095
msgid "Select a part" msgid "Select a part"
msgstr "" msgstr ""
#: part/views.py:1097 #: part/views.py:1099
msgid "Specify quantity" msgid "Specify quantity"
msgstr "" msgstr ""
@ -459,51 +615,80 @@ msgstr ""
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
#: stock/views.py:396 #: stock/templates/stock/location.html:37
msgid "Location Details"
msgstr ""
#: stock/templates/stock/location.html:40
msgid "Location Path"
msgstr ""
#: stock/templates/stock/location.html:44
msgid "Location Description"
msgstr ""
#: stock/templates/stock/location.html:48
msgid "Sublocations"
msgstr ""
#: stock/templates/stock/location.html:52
#: stock/templates/stock/location.html:64
msgid "Stock Items"
msgstr ""
#: stock/templates/stock/location.html:57
msgid "Stock Details"
msgstr ""
#: stock/templates/stock/location.html:60
msgid "Stock Locations"
msgstr ""
#: stock/views.py:399
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:408 #: stock/views.py:411
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:416 #: stock/views.py:419
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:484 #: stock/views.py:487
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:499 #: stock/views.py:502
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:512 #: stock/views.py:515
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:540 #: stock/views.py:543
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:543 #: stock/views.py:546
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:810 #: stock/views.py:813
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:872 #: stock/views.py:875
msgid "Created new stock item" msgid "Created new stock item"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-26 00:37+0000\n" "POT-Creation-Date: 2019-09-27 00:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -149,7 +149,7 @@ msgstr ""
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})" msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
msgstr "" msgstr ""
#: build/views.py:289 stock/views.py:831 #: build/views.py:289 stock/views.py:834
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -222,7 +222,7 @@ msgstr ""
msgid "Company" msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1030 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:437 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -345,32 +345,188 @@ msgstr ""
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "" msgstr ""
#: part/views.py:194 #: part/templates/part/category.html:13 part/templates/part/category.html:69
msgid "Part Categories"
msgstr ""
#: part/templates/part/category.html:14
msgid "All parts"
msgstr ""
#: part/templates/part/category.html:34
msgid "Category Details"
msgstr ""
#: part/templates/part/category.html:37
msgid "Category Path"
msgstr ""
#: part/templates/part/category.html:41
msgid "Category Description"
msgstr ""
#: part/templates/part/category.html:46 part/templates/part/detail.html:63
msgid "Default Location"
msgstr ""
#: part/templates/part/category.html:52 part/templates/part/detail.html:43
msgid "Keywords"
msgstr ""
#: part/templates/part/category.html:57
msgid "Subcategories"
msgstr ""
#: part/templates/part/category.html:61
msgid "Parts (Including subcategories)"
msgstr ""
#: part/templates/part/category.html:66 part/templates/part/detail.html:8
msgid "Part Details"
msgstr ""
#: part/templates/part/category.html:73
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""
#: part/templates/part/detail.html:27
msgid "Revision"
msgstr ""
#: part/templates/part/detail.html:32
msgid "Description"
msgstr ""
#: part/templates/part/detail.html:37
msgid "Variant Of"
msgstr ""
#: part/templates/part/detail.html:49
msgid "URL"
msgstr ""
#: part/templates/part/detail.html:54
msgid "Category"
msgstr ""
#: part/templates/part/detail.html:69
msgid "Default Supplier"
msgstr ""
#: part/templates/part/detail.html:76
msgid "Units"
msgstr ""
#: part/templates/part/detail.html:81
msgid "Minimum Stock"
msgstr ""
#: part/templates/part/detail.html:90
msgid "Virtual"
msgstr ""
#: part/templates/part/detail.html:93
msgid "Part is virtual (not a physical part)"
msgstr ""
#: part/templates/part/detail.html:95
msgid "Part is not a virtual part"
msgstr ""
#: part/templates/part/detail.html:99
msgid "Assembly"
msgstr ""
#: part/templates/part/detail.html:102
msgid "Part can be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:104
msgid "Part cannot be assembled from other parts"
msgstr ""
#: part/templates/part/detail.html:108
msgid "Component"
msgstr ""
#: part/templates/part/detail.html:111
msgid "Part can be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:113
msgid "Part cannot be used in assemblies"
msgstr ""
#: part/templates/part/detail.html:117
msgid "Trackable"
msgstr ""
#: part/templates/part/detail.html:120
msgid "Part stock is tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:122
msgid "Part stock is not tracked by serial number"
msgstr ""
#: part/templates/part/detail.html:126
msgid "Purchaseable"
msgstr ""
#: part/templates/part/detail.html:129 part/templates/part/detail.html:131
msgid "Part can be purchased from external suppliers"
msgstr ""
#: part/templates/part/detail.html:136
msgid "Sellable"
msgstr ""
#: part/templates/part/detail.html:139
msgid "Part can be sold to customers"
msgstr ""
#: part/templates/part/detail.html:141
msgid "Part cannot be sold to customers"
msgstr ""
#: part/templates/part/detail.html:151
msgid "Notes"
msgstr ""
#: part/views.py:196
#, python-brace-format #, python-brace-format
msgid "Set category for {n} parts" msgid "Set category for {n} parts"
msgstr "" msgstr ""
#: part/views.py:771 #: part/views.py:773
msgid "No BOM file provided" msgid "No BOM file provided"
msgstr "" msgstr ""
#: part/views.py:1032 #: part/views.py:1034
msgid "Enter a valid quantity" msgid "Enter a valid quantity"
msgstr "" msgstr ""
#: part/views.py:1056 part/views.py:1059 #: part/views.py:1058 part/views.py:1061
msgid "Select valid part" msgid "Select valid part"
msgstr "" msgstr ""
#: part/views.py:1065 #: part/views.py:1067
msgid "Duplicate part selected" msgid "Duplicate part selected"
msgstr "" msgstr ""
#: part/views.py:1093 #: part/views.py:1095
msgid "Select a part" msgid "Select a part"
msgstr "" msgstr ""
#: part/views.py:1097 #: part/views.py:1099
msgid "Specify quantity" msgid "Specify quantity"
msgstr "" msgstr ""
@ -459,51 +615,80 @@ msgstr ""
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
#: stock/views.py:396 #: stock/templates/stock/location.html:37
msgid "Location Details"
msgstr ""
#: stock/templates/stock/location.html:40
msgid "Location Path"
msgstr ""
#: stock/templates/stock/location.html:44
msgid "Location Description"
msgstr ""
#: stock/templates/stock/location.html:48
msgid "Sublocations"
msgstr ""
#: stock/templates/stock/location.html:52
#: stock/templates/stock/location.html:64
msgid "Stock Items"
msgstr ""
#: stock/templates/stock/location.html:57
msgid "Stock Details"
msgstr ""
#: stock/templates/stock/location.html:60
msgid "Stock Locations"
msgstr ""
#: stock/views.py:399
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:408 #: stock/views.py:411
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:416 #: stock/views.py:419
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:484 #: stock/views.py:487
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:499 #: stock/views.py:502
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:512 #: stock/views.py:515
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:540 #: stock/views.py:543
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:543 #: stock/views.py:546
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:810 #: stock/views.py:813
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:872 #: stock/views.py:875
msgid "Created new stock item" msgid "Created new stock item"
msgstr "" msgstr ""

View File

@ -1,5 +1,6 @@
{% extends "part/part_app_base.html" %} {% extends "part/part_app_base.html" %}
{% load static %} {% load static %}
{% load i18n %}
{% block content %} {% block content %}
@ -9,8 +10,8 @@
<h3>{{ category.name }}</h3> <h3>{{ category.name }}</h3>
<p>{{ category.description }}</p> <p>{{ category.description }}</p>
{% else %} {% else %}
<h3>Part Categories</h3> <h3>{% trans "Part Categories" %}</h3>
<p>All parts</p> <p>{% trans "All parts" %}</p>
{% endif %} {% endif %}
<p> <p>
<div class='btn-group'> <div class='btn-group'>
@ -30,37 +31,49 @@
</div> </div>
<div class='col-sm-6'> <div class='col-sm-6'>
{% if category %} {% if category %}
<h3>Category Details</h3> <h3>{% trans "Category Details" %}</h3>
<table class='table table-condensed table-striped'> <table class='table table-condensed table-striped'>
<tr> <tr>
<td>Category Path</td> <td>{% trans "Category Path" %}</td>
<td>{{ category.pathstring }}</td> <td>{{ category.pathstring }}</td>
</tr> </tr>
<tr> <tr>
<td>Category Description</td> <td>{% trans "Category Description" %}</td>
<td>{{ category.description }}</td> <td>{{ category.description }}</td>
</tr> </tr>
{% if category.default_location %} {% if category.default_location %}
<tr> <tr>
<td>Default Location</td> <td>{% trans "Default Location" %}</td>
<td><a href="{% url 'stock-location-detail' category.default_location.pk %}">{{ category.default_location.pathstring }}</a></td> <td><a href="{% url 'stock-location-detail' category.default_location.pk %}">{{ category.default_location.pathstring }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
{% if category.default_keywords %} {% if category.default_keywords %}
<tr> <tr>
<td>Keywords</td> <td>{% trans "Keywords" %}</td>
<td>{{ category.default_keywords }}</td> <td>{{ category.default_keywords }}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td>Subcategories</td> <td>{% trans "Subcategories" %}</td>
<td>{{ category.children.count }}</td> <td>{{ category.children.count }}</td>
</tr> </tr>
<tr> <tr>
<td>Parts (Including subcategories)</td> <td>{% trans "Parts (Including subcategories)" %}</td>
<td>{{ category.partcount }}</td> <td>{{ category.partcount }}</td>
</tr> </tr>
</table> </table>
{% else %}
<h3>{% trans "Part Details" %}</h3>
<table class='table table-striped table-condensed'>
<tr>
<td>{% trans "Part Categories" %}</td>
<td>{{ category_count }}</td>
</tr>
<tr>
<td>{% trans "Parts" %}</td>
<td>{{ part_count }}</td>
</tr>
</table>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -1,10 +1,11 @@
{% extends "part/part_base.html" %} {% extends "part/part_base.html" %}
{% load static %} {% load static %}
{% load i18n %}
{% block details %} {% block details %}
{% include 'part/tabs.html' with tab='detail' %} {% include 'part/tabs.html' with tab='detail' %}
<h4>Part Details</h4> <h4>{% trans "Part Details" %}</h4>
<hr> <hr>
@ -12,45 +13,45 @@
<div class='col-sm-6'> <div class='col-sm-6'>
<table class='table table-striped'> <table class='table table-striped'>
<tr> <tr>
<td><b>Part name</b></td> <td><b>{% trans "Part name" %}</b></td>
<td>{{ part.name }}</td> <td>{{ part.name }}</td>
</tr> </tr>
{% if part.IPN %} {% if part.IPN %}
<tr> <tr>
<td><b>IPN</b></td> <td><b>{% trans "IPN" %}</b></td>
<td>{{ part.IPN }}</td> <td>{{ part.IPN }}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.revision %} {% if part.revision %}
<tr> <tr>
<td><b>Revision</b></td> <td><b>{% trans "Revision" %}</b></td>
<td>{{ part.revision }}</td> <td>{{ part.revision }}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td><b>Description</b></td> <td><b>{% trans "Description" %}</b></td>
<td>{{ part.description }}</td> <td>{{ part.description }}</td>
</tr> </tr>
{% if part.variant_of %} {% if part.variant_of %}
<tr> <tr>
<td><b>Variant Of</b></td> <td><b>{% trans "Variant Of" %}</b></td>
<td><a href="{% url 'part-detail' part.variant_of.id %}">{{ part.variant_of.full_name }}</a></td> <td><a href="{% url 'part-detail' part.variant_of.id %}">{{ part.variant_of.full_name }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.keywords %} {% if part.keywords %}
<tr> <tr>
<td><b>Keywords</b></td> <td><b>{% trans "Keywords" %}</b></td>
<td>{{ part.keywords }}</td> <td>{{ part.keywords }}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.URL %} {% if part.URL %}
<tr> <tr>
<td><b>URL</b></td> <td><b>{% trans "URL" %}</b></td>
<td><a href="{{ part.URL }}">{{ part.URL }}</a></td> <td><a href="{{ part.URL }}">{{ part.URL }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td><b>Category</b></td> <td><b>{% trans "Category" %}</b></td>
<td> <td>
{% if part.category %} {% if part.category %}
<a href="{% url 'category-detail' part.category.id %}">{{ part.category.pathstring }}</a> <a href="{% url 'category-detail' part.category.id %}">{{ part.category.pathstring }}</a>
@ -59,25 +60,25 @@
</tr> </tr>
{% if part.default_location %} {% if part.default_location %}
<tr> <tr>
<td><b>Default Location</b></td> <td><b>{% trans "Default Location" %}</b></td>
<td><a href="{% url 'stock-location-detail' part.default_location.id %}">{{ part.default_location.pathstring }}</a></td> <td><a href="{% url 'stock-location-detail' part.default_location.id %}">{{ part.default_location.pathstring }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.default_supplier %} {% if part.default_supplier %}
<tr> <tr>
<td><b>Default Supplier</b></td> <td><b>{% trans "Default Supplier" %}</b></td>
<td><a href="{% url 'supplier-part-detail' part.default_supplier.id %}"> <td><a href="{% url 'supplier-part-detail' part.default_supplier.id %}">
{{ part.default_supplier.supplier.name }} | {{ part.default_supplier.SKU }} {{ part.default_supplier.supplier.name }} | {{ part.default_supplier.SKU }}
</a></td> </a></td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td><b>Units</b></td> <td><b>{% trans "Units" %}</b></td>
<td>{{ part.units }}</td> <td>{{ part.units }}</td>
</tr> </tr>
{% if part.minimum_stock > 0 %} {% if part.minimum_stock > 0 %}
<tr> <tr>
<td><b>Minimum Stock</b></td> <td><b>{% trans "Minimum Stock" %}</b></td>
<td>{{ part.minimum_stock }}</td> <td>{{ part.minimum_stock }}</td>
</tr> </tr>
{% endif %} {% endif %}
@ -86,58 +87,58 @@
<div class='col-sm-6'> <div class='col-sm-6'>
<table class='table table-striped'> <table class='table table-striped'>
<tr> <tr>
<td><b>Virtual</b></td> <td><b>{% trans "Virtual" %}</b></td>
<td>{% include "slide.html" with state=part.virtual field='virtual' %}</td> <td>{% include "slide.html" with state=part.virtual field='virtual' %}</td>
{% if part.virtual %} {% if part.virtual %}
<td>Part is virtual (not a physical part)</td> <td>{% trans "Part is virtual (not a physical part)" %}</td>
{% else %} {% else %}
<td><i>Part is not a virtual part</i></td> <td><i>{% trans "Part is not a virtual part" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
<tr> <tr>
<td><b>Assembly</b></td> <td><b>{% trans "Assembly" %}</b></td>
<td>{% include "slide.html" with state=part.assembly field='assembly' %}</td> <td>{% include "slide.html" with state=part.assembly field='assembly' %}</td>
{% if part.assembly %} {% if part.assembly %}
<td>Part can be assembled from other parts</td> <td>{% trans "Part can be assembled from other parts" %}</td>
{% else %} {% else %}
<td><i>Part cannot be assembled from other parts</i></td> <td><i>{% trans "Part cannot be assembled from other parts" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
<tr> <tr>
<td><b>Component</b></td> <td><b>{% trans "Component" %}</b></td>
<td>{% include "slide.html" with state=part.component field='component' %}</td> <td>{% include "slide.html" with state=part.component field='component' %}</td>
{% if part.component %} {% if part.component %}
<td>Part can be used in assemblies</td> <td>{% trans "Part can be used in assemblies" %}</td>
{% else %} {% else %}
<td><i>Part cannot be used in assemblies</i></td> <td><i>{% trans "Part cannot be used in assemblies" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
<tr> <tr>
<td><b>Trackable</b></td> <td><b>{% trans "Trackable" %}</b></td>
<td>{% include "slide.html" with state=part.trackable field='trackable' %}</td> <td>{% include "slide.html" with state=part.trackable field='trackable' %}</td>
{% if part.trackable %} {% if part.trackable %}
<td>Part stock is tracked by serial number</td> <td>{% trans "Part stock is tracked by serial number" %}</td>
{% else %} {% else %}
<td><i>Part stock is not tracked by serial number</i></td> <td><i>{% trans "Part stock is not tracked by serial number" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
<tr> <tr>
<td><b>Purchaseable</b></td> <td><b>{% trans "Purchaseable" %}</b></td>
<td>{% include "slide.html" with state=part.purchaseable field='purchaseable' %}</td> <td>{% include "slide.html" with state=part.purchaseable field='purchaseable' %}</td>
{% if part.purchaseable %} {% if part.purchaseable %}
<td>Part can be purchased from external suppliers</td> <td>{% trans "Part can be purchased from external suppliers" %}</td>
{% else %} {% else %}
<td><i>Part can be purchased from external suppliers</i></td> <td><i>{% trans "Part can be purchased from external suppliers" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
{% if 0 %} {% if 0 %}
<tr> <tr>
<td><b>Sellable</b></td> <td><b>{% trans "Sellable" %}</b></td>
<td>{% include "slide.html" with state=part.salable field='salable' %}</td> <td>{% include "slide.html" with state=part.salable field='salable' %}</td>
{% if part.salable %} {% if part.salable %}
<td>Part can be sold to customers</td> <td>{% trans "Part can be sold to customers" %}</td>
{% else %} {% else %}
<td><i>Part cannot be sold to customers</i></td> <td><i>{% trans "Part cannot be sold to customers" %}</i></td>
{% endif %} {% endif %}
</tr> </tr>
{% endif %} {% endif %}
@ -147,7 +148,7 @@
{% if part.notes %} {% if part.notes %}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><b>Notes</b></div> <div class="panel-heading"><b>{% trans "Notes" %}</b></div>
<div class="panel-body">{{ part.notes }}</div> <div class="panel-body">{{ part.notes }}</div>
</div> </div>
{% endif %} {% endif %}

View File

@ -56,6 +56,8 @@ class PartIndex(ListView):
children = PartCategory.objects.filter(parent=None) children = PartCategory.objects.filter(parent=None)
context['children'] = children context['children'] = children
context['category_count'] = PartCategory.objects.count()
context['part_count'] = Part.objects.count()
return context return context

View File

@ -1,5 +1,6 @@
{% extends "stock/stock_app_base.html" %} {% extends "stock/stock_app_base.html" %}
{% load static %} {% load static %}
{% load i18n %}
{% block content %} {% block content %}
<div class='row'> <div class='row'>
@ -33,25 +34,37 @@
</div> </div>
<div class='col-sm-6'> <div class='col-sm-6'>
{% if location %} {% if location %}
<h3>Location Details</h3> <h3>{% trans "Location Details" %}</h3>
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
<tr> <tr>
<td>Location Path</td> <td>{% trans "Location Path" %}</td>
<td>{{ location.pathstring }}</td> <td>{{ location.pathstring }}</td>
</tr> </tr>
<tr> <tr>
<td>Location Description</td> <td>{% trans "Location Description" %}</td>
<td>{{ location.description }}</td> <td>{{ location.description }}</td>
</tr> </tr>
<tr> <tr>
<td>Sublocations</td> <td>{% trans "Sublocations" %}</td>
<td>{{ location.children.count }}</td> <td>{{ location.children.count }}</td>
</tr> </tr>
<tr> <tr>
<td>Stock Items</td> <td>{% trans "Stock Items" %}</td>
<td>{{ location.item_count }}</td> <td>{{ location.item_count }}</td>
</tr> </tr>
</table> </table>
{% else %}
<h3>{% trans "Stock Details" %}</h3>
<table class='table table-striped table-condensed'>
<tr>
<td>{% trans "Stock Locations" %}</td>
<td>{{ loc_count }}</td>
</tr>
<tr>
<td>{% trans "Stock Items" %}</td>
<td>{{ stock_count }}</td>
</tr>
</table>
{% endif %} {% endif %}
</div> </div>
</h3> </h3>

View File

@ -53,6 +53,9 @@ class StockIndex(ListView):
context['locations'] = locations context['locations'] = locations
context['items'] = StockItem.objects.all() context['items'] = StockItem.objects.all()
context['loc_count'] = StockLocation.objects.count()
context['stock_count'] = StockItem.objects.count()
return context return context

View File

@ -113,14 +113,8 @@ $(document).ready(function () {
{% block js_ready %} {% block js_ready %}
{% endblock %} {% endblock %}
/* Run document-ready scripts.
* Ref: static/script/inventree/inventree.js
*/
inventreeDocReady(); inventreeDocReady();
/* Display any cached alert messages
* Ref: static/script/inventree/notification.js
*/
showCachedAlerts(); showCachedAlerts();
}); });
</script> </script>

View File

@ -18,7 +18,7 @@ locales = []
for line in str(out.decode()).split('\n'): for line in str(out.decode()).split('\n'):
# Check for any compiled translation files that have not been committed # Check for any compiled translation files that have not been committed
if 'modified:' in line and '/locale/' in line and 'django.mo' in line: if 'modified:' in line and '/locale/' in line and 'django.po' in line:
locales.append(line) locales.append(line)
if len(locales) > 0: if len(locales) > 0:

View File

@ -11,6 +11,6 @@ InvenTree supports multi-language translation using the `Django Translation Fram
Translation strings are located in the `InvenTree/locales/` directory, and translation files can be easily added here. Translation strings are located in the `InvenTree/locales/` directory, and translation files can be easily added here.
To set the default language, change the `langauge` setting in the `config.yaml` settings file. To set the default language, change the `language` setting in the `config.yaml` settings file.
To recompile the translation files (after adding new translation strings), run the command ``make translate`` from the root directory. To recompile the translation files (after adding new translation strings), run the command ``make translate`` from the root directory.