Print multi part label (#1963)

* Added description as list for StockLocation

* Merge pull request #1874 from SchrodingersGat/docker-dev-fix

Copy static files when starting dev server

(cherry picked from commit 50eb70f538)

* Merge pull request #1877 from eeintech/fix_search_js

Fixed missing comma propagating to translated JS files

(cherry picked from commit 2009773d9d)

* Merge pull request #1890 from matmair/fix-for-1888

catch connection errors in exchange update

(cherry picked from commit db57e9516b)

* Merge pull request #1887 from matmair/settings-safety

settings fixes

(cherry picked from commit d154ca08ea)

* 0.4.2

* Merge pull request #1894 from SchrodingersGat/non-int-serial-fix

Fix for non-integer serial numbers

(cherry picked from commit 529742b520)

* 0.4.4

Bump release version

* Bump version number -> 0.4.5

* Added a simple menu item to print multiple part labels. This does not follow the style of the Stock label functions but it works!

* Revert "Added description as list for StockLocation"

This reverts commit f5178e9fc3.

* Added the right version number

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
Guusggg 2021-08-17 04:42:40 +02:00 committed by GitHub
parent d6c9ff41ff
commit d8eefec065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -138,6 +138,7 @@
<li><a href='#' id='multi-part-category' title='{% trans "Set category" %}'>{% trans "Set Category" %}</a></li> <li><a href='#' id='multi-part-category' title='{% trans "Set category" %}'>{% trans "Set Category" %}</a></li>
{% endif %} {% endif %}
<li><a href='#' id='multi-part-order' title='{% trans "Order parts" %}'>{% trans "Order Parts" %}</a></li> <li><a href='#' id='multi-part-order' title='{% trans "Order parts" %}'>{% trans "Order Parts" %}</a></li>
<li><a href='#' id='multi-part-print-label' title='{% trans "Print Labels" %}'>{% trans "Print Labels" %}</a></li>
<li><a href='#' id='multi-part-export' title='{% trans "Export" %}'>{% trans "Export Data" %}</a></li> <li><a href='#' id='multi-part-export' title='{% trans "Export" %}'>{% trans "Export Data" %}</a></li>
</ul> </ul>
</div> </div>
@ -337,4 +338,4 @@
default: 'part-stock' default: 'part-stock'
}); });
{% endblock %} {% endblock %}

View File

@ -1003,6 +1003,18 @@ function loadPartTable(table, url, options={}) {
}); });
}); });
$('#multi-part-print-label').click(function() {
var selections = $(table).bootstrapTable('getSelections');
var items = [];
selections.forEach(function(item) {
items.push(item.pk);
});
printPartLabels(items);
});
$('#multi-part-export').click(function() { $('#multi-part-export').click(function() {
var selections = $(table).bootstrapTable("getSelections"); var selections = $(table).bootstrapTable("getSelections");