mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Simplify barcode plugin class
This commit is contained in:
parent
7b374ec2f1
commit
bfe5c40fae
@ -19,8 +19,14 @@ from plugin.mixins import BarcodeMixin
|
|||||||
from stock.models import StockItem, StockLocation
|
from stock.models import StockItem, StockLocation
|
||||||
|
|
||||||
|
|
||||||
class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
|
class InvenTreeInternalBarcodePlugin(BarcodeMixin, InvenTreePlugin):
|
||||||
"""Generic base class for handling InvenTree barcodes"""
|
"""Builtin BarcodePlugin for matching and generating internal barcodes."""
|
||||||
|
|
||||||
|
NAME = "InvenTreeInternalBarcode"
|
||||||
|
TITLE = _("Inventree Barcodes")
|
||||||
|
DESCRIPTION = _("Provides native support for barcodes")
|
||||||
|
VERSION = "2.0"
|
||||||
|
AUTHOR = _("InvenTree contributors")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_supported_barcode_models():
|
def get_supported_barcode_models():
|
||||||
@ -60,16 +66,6 @@ class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
|
|||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class InvenTreeInternalBarcodePlugin(InvenTreeBarcodePlugin):
|
|
||||||
"""Builtin BarcodePlugin for matching and generating internal barcodes."""
|
|
||||||
|
|
||||||
NAME = "InvenTreeInternalBarcode"
|
|
||||||
TITLE = _("Inventree Barcodes")
|
|
||||||
DESCRIPTION = _("Provides native support for barcodes")
|
|
||||||
VERSION = "2.0"
|
|
||||||
AUTHOR = _("InvenTree contributors")
|
|
||||||
|
|
||||||
def scan(self, barcode_data):
|
def scan(self, barcode_data):
|
||||||
"""Scan a barcode against this plugin.
|
"""Scan a barcode against this plugin.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class CoreNotificationsPlugin(SettingsMixin, InvenTreePlugin):
|
|||||||
TITLE = _("InvenTree Notifications")
|
TITLE = _("InvenTree Notifications")
|
||||||
AUTHOR = _('InvenTree contributors')
|
AUTHOR = _('InvenTree contributors')
|
||||||
DESCRIPTION = _('Integrated outgoing notificaton methods')
|
DESCRIPTION = _('Integrated outgoing notificaton methods')
|
||||||
VERSION = "0.1"
|
VERSION = "1.0"
|
||||||
|
|
||||||
SETTINGS = {
|
SETTINGS = {
|
||||||
'ENABLE_NOTIFICATION_EMAILS': {
|
'ENABLE_NOTIFICATION_EMAILS': {
|
||||||
|
@ -23,16 +23,16 @@
|
|||||||
<td>{% trans "Name" %}</td>
|
<td>{% trans "Name" %}</td>
|
||||||
<td>{{ plugin.human_name }}{% include "clip.html" %}</td>
|
<td>{{ plugin.human_name }}{% include "clip.html" %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-user'></span></span></td>
|
|
||||||
<td>{% trans "Author" %}</td>
|
|
||||||
<td>{{ plugin.author }}{% include "clip.html" %}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>{% trans "Description" %}</td>
|
<td>{% trans "Description" %}</td>
|
||||||
<td>{{ plugin.description }}{% include "clip.html" %}</td>
|
<td>{{ plugin.description }}{% include "clip.html" %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-user'></span></span></td>
|
||||||
|
<td>{% trans "Author" %}</td>
|
||||||
|
<td>{{ plugin.author }}{% include "clip.html" %}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-calendar-alt'></span></td>
|
<td><span class='fas fa-calendar-alt'></span></td>
|
||||||
<td>{% trans "Date" %}</td>
|
<td>{% trans "Date" %}</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user