Update stock adjustment dialog

This commit is contained in:
Oliver Walters 2019-11-16 20:29:05 +11:00
parent 2261973331
commit b7473be8ef
5 changed files with 170 additions and 123 deletions

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-11-16 09:12+0000\n" "POT-Creation-Date: 2019-11-16 09:28+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:848 #: build/views.py:289 stock/views.py:859
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -227,7 +227,7 @@ msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1032 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:438 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -558,67 +558,67 @@ msgstr ""
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "" msgstr ""
#: stock/models.py:202 #: stock/models.py:201
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
msgstr "" msgstr ""
#: stock/models.py:207 #: stock/models.py:206
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "" msgstr ""
#: stock/models.py:226 #: stock/models.py:225
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "" msgstr ""
#: stock/models.py:236 stock/models.py:245 #: stock/models.py:235 stock/models.py:244
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "" msgstr ""
#: stock/models.py:237 #: stock/models.py:236
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
#: stock/models.py:253 #: stock/models.py:252
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "" msgstr ""
#: stock/models.py:262 #: stock/models.py:261
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "" msgstr ""
#: stock/models.py:361 #: stock/models.py:360
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "" msgstr ""
#: stock/models.py:435 #: stock/models.py:434
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "" msgstr ""
#: stock/models.py:441 #: stock/models.py:440
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "" msgstr ""
#: stock/models.py:444 stock/models.py:447 #: stock/models.py:443 stock/models.py:446
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "" msgstr ""
#: stock/models.py:450 #: stock/models.py:449
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "" msgstr ""
#: stock/models.py:460 #: stock/models.py:459
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "" msgstr ""
#: stock/models.py:481 #: stock/models.py:480
msgid "Add serial number" msgid "Add serial number"
msgstr "" msgstr ""
#: stock/models.py:484 #: stock/models.py:483
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
@ -643,6 +643,7 @@ msgid "Belongs To"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:77 #: stock/templates/stock/item.html:77
#: stock/templates/stock/stock_adjust.html:16
msgid "Location" msgid "Location"
msgstr "" msgstr ""
@ -651,6 +652,7 @@ msgid "Serial Number"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:88 #: stock/templates/stock/item.html:88
#: stock/templates/stock/stock_adjust.html:20
msgid "Quantity" msgid "Quantity"
msgstr "" msgstr ""
@ -723,71 +725,80 @@ msgstr ""
msgid "Stock Locations" msgid "Stock Locations"
msgstr "" msgstr ""
#: stock/views.py:370 #: stock/templates/stock/stock_adjust.html:15
msgid "Move Stock Items" msgid "Stock Item"
msgstr ""
#: stock/views.py:371
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:372
msgid "Remove From Stock"
msgstr "" msgstr ""
#: stock/views.py:373 #: stock/views.py:373
msgid "Add Stock Items" msgid "Move Stock Items"
msgstr "" msgstr ""
#: stock/views.py:374 #: stock/views.py:374
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:375
msgid "Remove From Stock"
msgstr ""
#: stock/views.py:376
msgid "Add Stock Items"
msgstr ""
#: stock/views.py:377
msgid "Delete Stock Items" msgid "Delete Stock Items"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:406 #: stock/views.py:409
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:413 #: stock/views.py:416
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:421 #: stock/views.py:424
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:492 #: stock/views.py:495
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:507 #: stock/views.py:510
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:520 #: stock/views.py:523
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:548 #: stock/views.py:551
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:551 #: stock/views.py:554
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:827 #: stock/views.py:573
#, python-brace-format
msgid "Deleted {n} stock items"
msgstr ""
#: stock/views.py:838
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:889 #: stock/views.py:900
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-11-16 09:12+0000\n" "POT-Creation-Date: 2019-11-16 09:28+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:848 #: build/views.py:289 stock/views.py:859
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -227,7 +227,7 @@ msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1032 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:438 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -558,67 +558,67 @@ msgstr ""
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "" msgstr ""
#: stock/models.py:202 #: stock/models.py:201
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
msgstr "" msgstr ""
#: stock/models.py:207 #: stock/models.py:206
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "" msgstr ""
#: stock/models.py:226 #: stock/models.py:225
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "" msgstr ""
#: stock/models.py:236 stock/models.py:245 #: stock/models.py:235 stock/models.py:244
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "" msgstr ""
#: stock/models.py:237 #: stock/models.py:236
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
#: stock/models.py:253 #: stock/models.py:252
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "" msgstr ""
#: stock/models.py:262 #: stock/models.py:261
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "" msgstr ""
#: stock/models.py:361 #: stock/models.py:360
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "" msgstr ""
#: stock/models.py:435 #: stock/models.py:434
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "" msgstr ""
#: stock/models.py:441 #: stock/models.py:440
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "" msgstr ""
#: stock/models.py:444 stock/models.py:447 #: stock/models.py:443 stock/models.py:446
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "" msgstr ""
#: stock/models.py:450 #: stock/models.py:449
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "" msgstr ""
#: stock/models.py:460 #: stock/models.py:459
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "" msgstr ""
#: stock/models.py:481 #: stock/models.py:480
msgid "Add serial number" msgid "Add serial number"
msgstr "" msgstr ""
#: stock/models.py:484 #: stock/models.py:483
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
@ -643,6 +643,7 @@ msgid "Belongs To"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:77 #: stock/templates/stock/item.html:77
#: stock/templates/stock/stock_adjust.html:16
msgid "Location" msgid "Location"
msgstr "" msgstr ""
@ -651,6 +652,7 @@ msgid "Serial Number"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:88 #: stock/templates/stock/item.html:88
#: stock/templates/stock/stock_adjust.html:20
msgid "Quantity" msgid "Quantity"
msgstr "" msgstr ""
@ -723,71 +725,80 @@ msgstr ""
msgid "Stock Locations" msgid "Stock Locations"
msgstr "" msgstr ""
#: stock/views.py:370 #: stock/templates/stock/stock_adjust.html:15
msgid "Move Stock Items" msgid "Stock Item"
msgstr ""
#: stock/views.py:371
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:372
msgid "Remove From Stock"
msgstr "" msgstr ""
#: stock/views.py:373 #: stock/views.py:373
msgid "Add Stock Items" msgid "Move Stock Items"
msgstr "" msgstr ""
#: stock/views.py:374 #: stock/views.py:374
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:375
msgid "Remove From Stock"
msgstr ""
#: stock/views.py:376
msgid "Add Stock Items"
msgstr ""
#: stock/views.py:377
msgid "Delete Stock Items" msgid "Delete Stock Items"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:406 #: stock/views.py:409
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:413 #: stock/views.py:416
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:421 #: stock/views.py:424
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:492 #: stock/views.py:495
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:507 #: stock/views.py:510
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:520 #: stock/views.py:523
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:548 #: stock/views.py:551
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:551 #: stock/views.py:554
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:827 #: stock/views.py:573
#, python-brace-format
msgid "Deleted {n} stock items"
msgstr ""
#: stock/views.py:838
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:889 #: stock/views.py:900
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-11-16 09:12+0000\n" "POT-Creation-Date: 2019-11-16 09:28+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:848 #: build/views.py:289 stock/views.py:859
#, python-brace-format #, python-brace-format
msgid "The following serial numbers already exist: ({sn})" msgid "The following serial numbers already exist: ({sn})"
msgstr "" msgstr ""
@ -227,7 +227,7 @@ msgid "Company"
msgstr "" msgstr ""
#: order/models.py:156 order/models.py:201 part/views.py:1032 #: order/models.py:156 order/models.py:201 part/views.py:1032
#: stock/models.py:438 #: stock/models.py:437
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -558,67 +558,67 @@ msgstr ""
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "" msgstr ""
#: stock/models.py:202 #: stock/models.py:201
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
msgstr "" msgstr ""
#: stock/models.py:207 #: stock/models.py:206
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "" msgstr ""
#: stock/models.py:226 #: stock/models.py:225
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "" msgstr ""
#: stock/models.py:236 stock/models.py:245 #: stock/models.py:235 stock/models.py:244
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "" msgstr ""
#: stock/models.py:237 #: stock/models.py:236
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
#: stock/models.py:253 #: stock/models.py:252
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "" msgstr ""
#: stock/models.py:262 #: stock/models.py:261
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "" msgstr ""
#: stock/models.py:361 #: stock/models.py:360
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "" msgstr ""
#: stock/models.py:435 #: stock/models.py:434
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "" msgstr ""
#: stock/models.py:441 #: stock/models.py:440
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "" msgstr ""
#: stock/models.py:444 stock/models.py:447 #: stock/models.py:443 stock/models.py:446
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "" msgstr ""
#: stock/models.py:450 #: stock/models.py:449
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "" msgstr ""
#: stock/models.py:460 #: stock/models.py:459
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "" msgstr ""
#: stock/models.py:481 #: stock/models.py:480
msgid "Add serial number" msgid "Add serial number"
msgstr "" msgstr ""
#: stock/models.py:484 #: stock/models.py:483
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
@ -643,6 +643,7 @@ msgid "Belongs To"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:77 #: stock/templates/stock/item.html:77
#: stock/templates/stock/stock_adjust.html:16
msgid "Location" msgid "Location"
msgstr "" msgstr ""
@ -651,6 +652,7 @@ msgid "Serial Number"
msgstr "" msgstr ""
#: stock/templates/stock/item.html:88 #: stock/templates/stock/item.html:88
#: stock/templates/stock/stock_adjust.html:20
msgid "Quantity" msgid "Quantity"
msgstr "" msgstr ""
@ -723,71 +725,80 @@ msgstr ""
msgid "Stock Locations" msgid "Stock Locations"
msgstr "" msgstr ""
#: stock/views.py:370 #: stock/templates/stock/stock_adjust.html:15
msgid "Move Stock Items" msgid "Stock Item"
msgstr ""
#: stock/views.py:371
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:372
msgid "Remove From Stock"
msgstr "" msgstr ""
#: stock/views.py:373 #: stock/views.py:373
msgid "Add Stock Items" msgid "Move Stock Items"
msgstr "" msgstr ""
#: stock/views.py:374 #: stock/views.py:374
msgid "Count Stock Items"
msgstr ""
#: stock/views.py:375
msgid "Remove From Stock"
msgstr ""
#: stock/views.py:376
msgid "Add Stock Items"
msgstr ""
#: stock/views.py:377
msgid "Delete Stock Items" msgid "Delete Stock Items"
msgstr "" msgstr ""
#: stock/views.py:401 #: stock/views.py:404
msgid "Must enter integer value" msgid "Must enter integer value"
msgstr "" msgstr ""
#: stock/views.py:406 #: stock/views.py:409
msgid "Quantity must be positive" msgid "Quantity must be positive"
msgstr "" msgstr ""
#: stock/views.py:413 #: stock/views.py:416
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed {x}" msgid "Quantity must not exceed {x}"
msgstr "" msgstr ""
#: stock/views.py:421 #: stock/views.py:424
msgid "Confirm stock adjustment" msgid "Confirm stock adjustment"
msgstr "" msgstr ""
#: stock/views.py:492 #: stock/views.py:495
#, python-brace-format #, python-brace-format
msgid "Added stock to {n} items" msgid "Added stock to {n} items"
msgstr "" msgstr ""
#: stock/views.py:507 #: stock/views.py:510
#, python-brace-format #, python-brace-format
msgid "Removed stock from {n} items" msgid "Removed stock from {n} items"
msgstr "" msgstr ""
#: stock/views.py:520 #: stock/views.py:523
#, python-brace-format #, python-brace-format
msgid "Counted stock for {n} items" msgid "Counted stock for {n} items"
msgstr "" msgstr ""
#: stock/views.py:548 #: stock/views.py:551
msgid "No items were moved" msgid "No items were moved"
msgstr "" msgstr ""
#: stock/views.py:551 #: stock/views.py:554
#, python-brace-format #, python-brace-format
msgid "Moved {n} items to {dest}" msgid "Moved {n} items to {dest}"
msgstr "" msgstr ""
#: stock/views.py:827 #: stock/views.py:573
#, python-brace-format
msgid "Deleted {n} stock items"
msgstr ""
#: stock/views.py:838
msgid "Invalid part selection" msgid "Invalid part selection"
msgstr "" msgstr ""
#: stock/views.py:889 #: stock/views.py:900
msgid "Created new stock item" msgid "Created new stock item"
msgstr "" msgstr ""

View File

@ -1,3 +1,5 @@
{% load i18n %}
{% block pre_form_content %} {% block pre_form_content %}
{% endblock %} {% endblock %}
@ -10,9 +12,13 @@
<table class='table table-condensed table-striped' id='stock-table'> <table class='table table-condensed table-striped' id='stock-table'>
<tr> <tr>
<th>Stock Item</th> <th>{% trans "Stock Item" %}</th>
<th>Location</th> <th>{% trans "Location" %}</th>
{% if edit_quantity %}
<th>{{ stock_action_title }}</th> <th>{{ stock_action_title }}</th>
{% else %}
<th>{% trans "Quantity" %}</th>
{% endif %}
<th></th> <th></th>
</tr> </tr>
{% for item in stock_items %} {% for item in stock_items %}
@ -21,6 +27,7 @@
{{ item.part.full_name }} <small><i>{{ item.part.description }}</i></small></td> {{ item.part.full_name }} <small><i>{{ item.part.description }}</i></small></td>
<td>{{ item.location.pathstring }}</td> <td>{{ item.location.pathstring }}</td>
<td> <td>
{% if edit_quantity %}
<input class='numberinput' <input class='numberinput'
min='0' min='0'
{% if stock_action == 'take' or stock_action == 'move' %} max='{{ item.quantity }}' {% endif %} {% if stock_action == 'take' or stock_action == 'move' %} max='{{ item.quantity }}' {% endif %}
@ -28,6 +35,10 @@
{% if item.error %} {% if item.error %}
<br><span class='help-inline'>{{ item.error }}</span> <br><span class='help-inline'>{{ item.error }}</span>
{% endif %} {% endif %}
{% else %}
{{ item.new_quantity }}
<input type='hidden' name='stock-id-{{ item.id }}' value='{{ item.new_quantity }}'/>
{% endif %}
</td> </td>
<td><button class='btn btn-default btn-remove' onclick='removeStockRow()' id='del-{{ item.id }}' title='Remove item' type='button'><span row='stock-row-{{ item.id }}' class='glyphicon glyphicon-small glyphicon-remove'></span></button></td> <td><button class='btn btn-default btn-remove' onclick='removeStockRow()' id='del-{{ item.id }}' title='Remove item' type='button'><span row='stock-row-{{ item.id }}' class='glyphicon glyphicon-small glyphicon-remove'></span></button></td>
</tr> </tr>

View File

@ -338,10 +338,13 @@ class StockAdjust(AjaxView, FormMixin):
context['stock_items'] = self.stock_items context['stock_items'] = self.stock_items
context['stock_action'] = self.stock_action context['stock_action'] = self.stock_action.strip().lower()
context['stock_action_title'] = self.stock_action.capitalize() context['stock_action_title'] = self.stock_action.capitalize()
# Quantity column will be read-only in some circumstances
context['edit_quantity'] = not self.stock_action == 'delete'
return context return context
def get_form(self): def get_form(self):