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