npn can be null as is inventree allowed
This commit is contained in:
parent
edf6109aa2
commit
a23cc8dee8
@ -367,7 +367,7 @@ namespace BlubbFish.Applications.Barcodes.Inventree {
|
|||||||
r.Cells[3].Value = new LineItem {
|
r.Cells[3].Value = new LineItem {
|
||||||
Name = item["internal_part_name"].ToString(),
|
Name = item["internal_part_name"].ToString(),
|
||||||
SKU = item["sku"].ToString(),
|
SKU = item["sku"].ToString(),
|
||||||
MPN = item["mpn"].ToString(),
|
MPN = item["mpn"] is null ? "" : item["mpn"].ToString(),
|
||||||
LineNr = i,
|
LineNr = i,
|
||||||
Quantity = quantity,
|
Quantity = quantity,
|
||||||
EciaFormat = new Ecia {
|
EciaFormat = new Ecia {
|
||||||
@ -375,7 +375,7 @@ namespace BlubbFish.Applications.Barcodes.Inventree {
|
|||||||
SupplierOrderNumber = po.SupplierReference,
|
SupplierOrderNumber = po.SupplierReference,
|
||||||
ShipDate = DateTime.Now.ToString("yyyyMMdd"),
|
ShipDate = DateTime.Now.ToString("yyyyMMdd"),
|
||||||
SKU = item["sku"].ToString(),
|
SKU = item["sku"].ToString(),
|
||||||
MPN = item["mpn"].ToString(),
|
MPN = item["mpn"] is null ? "": item["mpn"].ToString(),
|
||||||
CustomerPOLine = i++.ToString(),
|
CustomerPOLine = i++.ToString(),
|
||||||
Quantity = quantity,
|
Quantity = quantity,
|
||||||
DateCode = DateTime.Now.ToString("yy01"),
|
DateCode = DateTime.Now.ToString("yy01"),
|
||||||
|
|||||||
@ -74,5 +74,10 @@
|
|||||||
<PackagePath>\</PackagePath>
|
<PackagePath>\</PackagePath>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Res\store.py">
|
||||||
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -14,19 +14,20 @@ from plugin.mixins import SettingsMixin, SupplierBarcodeMixin
|
|||||||
|
|
||||||
class ReicheltPlugin(SupplierBarcodeMixin, SettingsMixin, InvenTreePlugin):
|
class ReicheltPlugin(SupplierBarcodeMixin, SettingsMixin, InvenTreePlugin):
|
||||||
"""Plugin to integrate the Barcodes into InvenTree."""
|
"""Plugin to integrate the Barcodes into InvenTree."""
|
||||||
|
DEFAULT_SUPPLIER_NAME = 'Reichelt'
|
||||||
|
|
||||||
NAME = 'ReicheltBarcodePlugin'
|
NAME = DEFAULT_SUPPLIER_NAME+'BarcodePlugin'
|
||||||
SLUG = 'Reicheltplugin'
|
SLUG = DEFAULT_SUPPLIER_NAME+'plugin'
|
||||||
TITLE = _('Supplier Integration - Reichelt')
|
TITLE = _('Supplier Integration - '+DEFAULT_SUPPLIER_NAME)
|
||||||
DESCRIPTION = _('Provides support for scanning Reichelt barcodes')
|
DESCRIPTION = _('Provides support for scanning '+DEFAULT_SUPPLIER_NAME+' barcodes')
|
||||||
VERSION = '1.0.0'
|
VERSION = '1.0.0'
|
||||||
AUTHOR = _('BlubbFish')
|
AUTHOR = _('BlubbFish')
|
||||||
|
|
||||||
DEFAULT_SUPPLIER_NAME = 'Reichelt'
|
|
||||||
SETTINGS = {
|
SETTINGS = {
|
||||||
'SUPPLIER_ID': {
|
'SUPPLIER_ID': {
|
||||||
'name': _('Supplier'),
|
'name': _('Supplier'),
|
||||||
'description': _("The Supplier which acts as 'Reichelt'"),
|
'description': _("The Supplier which acts as '"+DEFAULT_SUPPLIER_NAME+"'"),
|
||||||
'model': 'company.company',
|
'model': 'company.company',
|
||||||
'model_filters': {'is_supplier': True},
|
'model_filters': {'is_supplier': True},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user