2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Merge branch 'fix-boolean' of https://github.com/matmair/InvenTree into fix-boolean

This commit is contained in:
Matthias
2022-05-15 17:52:34 +02:00
79 changed files with 1682 additions and 1215 deletions

View File

@ -156,7 +156,7 @@ class LabelPrintMixin:
# Offload a background task to print the provided label
offload_task(
'plugin.events.print_label',
'plugin.base.label.label.print_label',
plugin.plugin_slug(),
image,
label_instance=label_instance,

View File

@ -7,13 +7,12 @@ import os
from django.conf import settings
from django.apps import apps
from django.urls import reverse
from django.core.exceptions import ValidationError
from InvenTree.helpers import validateFilterString
from InvenTree.api_tester import InvenTreeAPITestCase
from .models import StockItemLabel, StockLocationLabel, PartLabel
from .models import StockItemLabel, StockLocationLabel
from stock.models import StockItem
@ -86,13 +85,3 @@ class LabelTest(InvenTreeAPITestCase):
with self.assertRaises(ValidationError):
validateFilterString(bad_filter_string, model=StockItem)
def test_label_rendering(self):
"""Test label rendering"""
labels = PartLabel.objects.all()
part = PartLabel.objects.first()
for label in labels:
url = reverse('api-part-label-print', kwargs={'pk': label.pk})
self.get(f'{url}?parts={part.pk}', expected_code=200)