Much better rendering and calculation of part allocations

This commit is contained in:
Oliver Walters 2020-04-28 10:43:46 +10:00
parent fb70da0331
commit 9add3d4409
7 changed files with 375 additions and 324 deletions

View File

@ -190,7 +190,7 @@ class Build(MPTTModel):
q_required = item.quantity * self.quantity q_required = item.quantity * self.quantity
# Grab a list of StockItem objects which are "in stock" # Grab a list of StockItem objects which are "in stock"
stock = StockItem.objects.filter(StockItem.IN_STOCK_FILTER) stock = StockModels.StockItem.objects.filter(StockModels.StockItem.IN_STOCK_FILTER)
# Filter by part reference # Filter by part reference
stock = stock.filter(part=item.sub_part) stock = stock.filter(part=item.sub_part)
@ -282,7 +282,7 @@ class Build(MPTTModel):
if self.part.trackable and serial_numbers: if self.part.trackable and serial_numbers:
# Add new serial numbers # Add new serial numbers
for serial in serial_numbers: for serial in serial_numbers:
item = StockItem.objects.create( item = StockModels.StockItem.objects.create(
part=self.part, part=self.part,
build=self, build=self,
location=location, location=location,
@ -296,7 +296,7 @@ class Build(MPTTModel):
else: else:
# Add stock of the newly created item # Add stock of the newly created item
item = StockItem.objects.create( item = StockModels.StockItem.objects.create(
part=self.part, part=self.part,
build=self, build=self,
location=location, location=location,
@ -342,9 +342,9 @@ class Build(MPTTModel):
""" """
try: try:
item = BomItem.objects.get(part=self.part.id, sub_part=part.id) item = PartModels.BomItem.objects.get(part=self.part.id, sub_part=part.id)
q = item.quantity q = item.quantity
except BomItem.DoesNotExist: except PartModels.BomItem.DoesNotExist:
q = 0 q = 0
return q * self.quantity return q * self.quantity

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-27 23:38+0000\n" "POT-Creation-Date: 2020-04-28 00:43+0000\n"
"PO-Revision-Date: 2020-02-02 08:07+0100\n" "PO-Revision-Date: 2020-02-02 08:07+0100\n"
"Last-Translator: Christian Schlüter <chschlue@gmail.com>\n" "Last-Translator: Christian Schlüter <chschlue@gmail.com>\n"
"Language-Team: C <kde-i18n-doc@kde.org>\n" "Language-Team: C <kde-i18n-doc@kde.org>\n"
@ -282,7 +282,7 @@ msgstr "Bau-Status"
msgid "Build status code" msgid "Build status code"
msgstr "Bau-Status" msgstr "Bau-Status"
#: build/models.py:120 stock/models.py:374 #: build/models.py:120 stock/models.py:378
#, fuzzy #, fuzzy
#| msgid "Batch" #| msgid "Batch"
msgid "Batch Code" msgid "Batch Code"
@ -296,11 +296,11 @@ msgstr "Chargennummer für diese Bau-Ausgabe"
#: company/templates/company/supplier_part_base.html:57 #: company/templates/company/supplier_part_base.html:57
#: company/templates/company/supplier_part_detail.html:24 #: company/templates/company/supplier_part_detail.html:24
#: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85
#: stock/models.py:368 stock/templates/stock/item_base.html:190 #: stock/models.py:372 stock/templates/stock/item_base.html:190
msgid "External Link" msgid "External Link"
msgstr "" msgstr ""
#: build/models.py:140 stock/models.py:370 #: build/models.py:140 stock/models.py:374
msgid "Link to external URL" msgid "Link to external URL"
msgstr "Link zu einer externen URL" msgstr "Link zu einer externen URL"
@ -308,7 +308,7 @@ msgstr "Link zu einer externen URL"
#: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15 #: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15
#: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/purchase_order_detail.html:200
#: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63
#: stock/models.py:436 stock/templates/stock/tabs.html:17 #: stock/models.py:440 stock/templates/stock/tabs.html:17
msgid "Notes" msgid "Notes"
msgstr "Notizen" msgstr "Notizen"
@ -384,7 +384,7 @@ msgstr "Lagerobjekt"
#: build/templates/build/allocate.html:161 #: build/templates/build/allocate.html:161
#: order/templates/order/sales_order_detail.html:68 #: order/templates/order/sales_order_detail.html:68
#: order/templates/order/sales_order_detail.html:150 stock/models.py:362 #: order/templates/order/sales_order_detail.html:150 stock/models.py:366
#: stock/templates/stock/item_base.html:149 #: stock/templates/stock/item_base.html:149
msgid "Serial Number" msgid "Serial Number"
msgstr "Seriennummer" msgstr "Seriennummer"
@ -398,6 +398,8 @@ msgstr "Seriennummer"
#: order/templates/order/purchase_order_detail.html:175 #: order/templates/order/purchase_order_detail.html:175
#: order/templates/order/sales_order_detail.html:70 #: order/templates/order/sales_order_detail.html:70
#: order/templates/order/sales_order_detail.html:152 #: order/templates/order/sales_order_detail.html:152
#: part/templates/part/allocation.html:16
#: part/templates/part/allocation.html:49
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
#: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:26
#: stock/templates/stock/item_base.html:155 #: stock/templates/stock/item_base.html:155
@ -533,6 +535,7 @@ msgstr "Status"
#: order/templates/order/sales_order_base.html:33 #: order/templates/order/sales_order_base.html:33
#: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_notes.html:10
#: order/templates/order/sales_order_ship.html:25 #: order/templates/order/sales_order_ship.html:25
#: part/templates/part/allocation.html:27
#: stock/templates/stock/item_base.html:123 #: stock/templates/stock/item_base.html:123
#, fuzzy #, fuzzy
#| msgid "Sales Orders" #| msgid "Sales Orders"
@ -1133,7 +1136,7 @@ msgid "New Sales Order"
msgstr "Bestellungen" msgstr "Bestellungen"
#: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:6
#: company/templates/company/supplier_part_base.html:19 stock/models.py:341 #: company/templates/company/supplier_part_base.html:19 stock/models.py:345
#: stock/templates/stock/item_base.html:202 #: stock/templates/stock/item_base.html:202
msgid "Supplier Part" msgid "Supplier Part"
msgstr "Zulieferer-Teil" msgstr "Zulieferer-Teil"
@ -1427,7 +1430,7 @@ msgid "Supplier order reference code"
msgstr "Bestell-Referenz" msgstr "Bestell-Referenz"
#: order/models.py:148 order/models.py:222 part/views.py:1113 #: order/models.py:148 order/models.py:222 part/views.py:1113
#: stock/models.py:604 #: stock/models.py:608
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "Anzahl muss größer Null sein" msgstr "Anzahl muss größer Null sein"
@ -2056,177 +2059,208 @@ msgstr "Eintragsmenge zur Preisberechnung"
msgid "Select currency for price calculation" msgid "Select currency for price calculation"
msgstr "Währung zur Preisberechnung wählen" msgstr "Währung zur Preisberechnung wählen"
#: part/models.py:62 #: part/models.py:64
msgid "Default location for parts in this category" msgid "Default location for parts in this category"
msgstr "Standard-Standort für Teile dieser Kategorie" msgstr "Standard-Standort für Teile dieser Kategorie"
#: part/models.py:65 #: part/models.py:67
msgid "Default keywords for parts in this category" msgid "Default keywords for parts in this category"
msgstr "Standard-Stichworte für Teile dieser Kategorie" msgstr "Standard-Stichworte für Teile dieser Kategorie"
#: part/models.py:339 #: part/models.py:341
msgid "Part must be unique for name, IPN and revision" msgid "Part must be unique for name, IPN and revision"
msgstr "Namen, Teile- und Revisionsnummern müssen eindeutig sein" msgstr "Namen, Teile- und Revisionsnummern müssen eindeutig sein"
#: part/models.py:353 #: part/models.py:355
msgid "Part cannot be a template part if it is a variant of another part" msgid "Part cannot be a template part if it is a variant of another part"
msgstr "Teil kann keine Vorlage sein wenn es Variante eines anderen Teils ist" msgstr "Teil kann keine Vorlage sein wenn es Variante eines anderen Teils ist"
#: part/models.py:354 #: part/models.py:356
msgid "Part cannot be a variant of another part if it is already a template" msgid "Part cannot be a variant of another part if it is already a template"
msgstr "" msgstr ""
"Teil kann keine Variante eines anderen Teils sein wenn es bereits eine " "Teil kann keine Variante eines anderen Teils sein wenn es bereits eine "
"Vorlage ist" "Vorlage ist"
#: part/models.py:358 part/templates/part/detail.html:19 #: part/models.py:360 part/templates/part/detail.html:19
msgid "Part name" msgid "Part name"
msgstr "Name des Teils" msgstr "Name des Teils"
#: part/models.py:362 #: part/models.py:364
msgid "Is this part a template part?" msgid "Is this part a template part?"
msgstr "Ist dieses Teil eine Vorlage?" msgstr "Ist dieses Teil eine Vorlage?"
#: part/models.py:371 #: part/models.py:373
msgid "Is this part a variant of another part?" msgid "Is this part a variant of another part?"
msgstr "Ist dieses Teil eine Variante eines anderen Teils?" msgstr "Ist dieses Teil eine Variante eines anderen Teils?"
#: part/models.py:373 #: part/models.py:375
msgid "Part description" msgid "Part description"
msgstr "Beschreibung des Teils" msgstr "Beschreibung des Teils"
#: part/models.py:375 #: part/models.py:377
msgid "Part keywords to improve visibility in search results" msgid "Part keywords to improve visibility in search results"
msgstr "Schlüsselworte um die Sichtbarkeit in Suchergebnissen zu verbessern" msgstr "Schlüsselworte um die Sichtbarkeit in Suchergebnissen zu verbessern"
#: part/models.py:380 #: part/models.py:382
msgid "Part category" msgid "Part category"
msgstr "Teile-Kategorie" msgstr "Teile-Kategorie"
#: part/models.py:382 #: part/models.py:384
msgid "Internal Part Number" msgid "Internal Part Number"
msgstr "Interne Teilenummer" msgstr "Interne Teilenummer"
#: part/models.py:384 #: part/models.py:386
msgid "Part revision or version number" msgid "Part revision or version number"
msgstr "Revisions- oder Versionsnummer" msgstr "Revisions- oder Versionsnummer"
#: part/models.py:386 #: part/models.py:388
msgid "Link to extenal URL" msgid "Link to extenal URL"
msgstr "Link zu einer Externen URL" msgstr "Link zu einer Externen URL"
#: part/models.py:398 #: part/models.py:400
msgid "Where is this item normally stored?" msgid "Where is this item normally stored?"
msgstr "Wo wird dieses Teil normalerweise gelagert?" msgstr "Wo wird dieses Teil normalerweise gelagert?"
#: part/models.py:442 #: part/models.py:444
msgid "Default supplier part" msgid "Default supplier part"
msgstr "Standard-Zulieferer?" msgstr "Standard-Zulieferer?"
#: part/models.py:445 #: part/models.py:447
msgid "Minimum allowed stock level" msgid "Minimum allowed stock level"
msgstr "Minimal zulässiger Lagerbestand" msgstr "Minimal zulässiger Lagerbestand"
#: part/models.py:447 #: part/models.py:449
msgid "Stock keeping units for this part" msgid "Stock keeping units for this part"
msgstr "Stock Keeping Units (SKU) für dieses Teil" msgstr "Stock Keeping Units (SKU) für dieses Teil"
#: part/models.py:449 #: part/models.py:451
msgid "Can this part be built from other parts?" msgid "Can this part be built from other parts?"
msgstr "Kann dieses Teil aus anderen Teilen angefertigt werden?" msgstr "Kann dieses Teil aus anderen Teilen angefertigt werden?"
#: part/models.py:451 #: part/models.py:453
msgid "Can this part be used to build other parts?" msgid "Can this part be used to build other parts?"
msgstr "Kann dieses Teil zum Bau von anderen genutzt werden?" msgstr "Kann dieses Teil zum Bau von anderen genutzt werden?"
#: part/models.py:453 #: part/models.py:455
msgid "Does this part have tracking for unique items?" msgid "Does this part have tracking for unique items?"
msgstr "Hat dieses Teil Tracking für einzelne Objekte?" msgstr "Hat dieses Teil Tracking für einzelne Objekte?"
#: part/models.py:455 #: part/models.py:457
msgid "Can this part be purchased from external suppliers?" msgid "Can this part be purchased from external suppliers?"
msgstr "Kann dieses Teil von externen Zulieferern gekauft werden?" msgstr "Kann dieses Teil von externen Zulieferern gekauft werden?"
#: part/models.py:457 #: part/models.py:459
msgid "Can this part be sold to customers?" msgid "Can this part be sold to customers?"
msgstr "Kann dieses Teil an Kunden verkauft werden?" msgstr "Kann dieses Teil an Kunden verkauft werden?"
#: part/models.py:459 #: part/models.py:461
msgid "Is this part active?" msgid "Is this part active?"
msgstr "Ist dieses Teil aktiv?" msgstr "Ist dieses Teil aktiv?"
#: part/models.py:461 #: part/models.py:463
msgid "Is this a virtual part, such as a software product or license?" msgid "Is this a virtual part, such as a software product or license?"
msgstr "Ist dieses Teil virtuell, wie zum Beispiel eine Software oder Lizenz?" msgstr "Ist dieses Teil virtuell, wie zum Beispiel eine Software oder Lizenz?"
#: part/models.py:463 #: part/models.py:465
msgid "Part notes - supports Markdown formatting" msgid "Part notes - supports Markdown formatting"
msgstr "Bemerkungen - unterstüzt Markdown-Formatierung" msgstr "Bemerkungen - unterstüzt Markdown-Formatierung"
#: part/models.py:465 #: part/models.py:467
msgid "Stored BOM checksum" msgid "Stored BOM checksum"
msgstr "Prüfsumme der Stückliste gespeichert" msgstr "Prüfsumme der Stückliste gespeichert"
#: part/models.py:1067 #: part/models.py:1069
msgid "Parameter template name must be unique" msgid "Parameter template name must be unique"
msgstr "Vorlagen-Name des Parameters muss eindeutig sein" msgstr "Vorlagen-Name des Parameters muss eindeutig sein"
#: part/models.py:1072 #: part/models.py:1074
msgid "Parameter Name" msgid "Parameter Name"
msgstr "Name des Parameters" msgstr "Name des Parameters"
#: part/models.py:1074 #: part/models.py:1076
msgid "Parameter Units" msgid "Parameter Units"
msgstr "Parameter Einheit" msgstr "Parameter Einheit"
#: part/models.py:1100 #: part/models.py:1102
msgid "Parent Part" msgid "Parent Part"
msgstr "Ausgangsteil" msgstr "Ausgangsteil"
#: part/models.py:1102 #: part/models.py:1104
msgid "Parameter Template" msgid "Parameter Template"
msgstr "Parameter Vorlage" msgstr "Parameter Vorlage"
#: part/models.py:1104 #: part/models.py:1106
msgid "Parameter Value" msgid "Parameter Value"
msgstr "Parameter Wert" msgstr "Parameter Wert"
#: part/models.py:1128 #: part/models.py:1130
msgid "Select parent part" msgid "Select parent part"
msgstr "Ausgangsteil auswählen" msgstr "Ausgangsteil auswählen"
#: part/models.py:1137 #: part/models.py:1139
msgid "Select part to be used in BOM" msgid "Select part to be used in BOM"
msgstr "Teil für die Nutzung in der Stückliste auswählen" msgstr "Teil für die Nutzung in der Stückliste auswählen"
#: part/models.py:1144 #: part/models.py:1146
msgid "BOM quantity for this BOM item" msgid "BOM quantity for this BOM item"
msgstr "Stücklisten-Anzahl für dieses Stücklisten-Teil" msgstr "Stücklisten-Anzahl für dieses Stücklisten-Teil"
#: part/models.py:1147 #: part/models.py:1149
msgid "Estimated build wastage quantity (absolute or percentage)" msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr "Geschätzter Ausschuss (absolut oder prozentual)" msgstr "Geschätzter Ausschuss (absolut oder prozentual)"
#: part/models.py:1150 #: part/models.py:1152
msgid "BOM item reference" msgid "BOM item reference"
msgstr "Referenz des Objekts auf der Stückliste" msgstr "Referenz des Objekts auf der Stückliste"
#: part/models.py:1153 #: part/models.py:1155
msgid "BOM item notes" msgid "BOM item notes"
msgstr "Notizen zum Stücklisten-Objekt" msgstr "Notizen zum Stücklisten-Objekt"
#: part/models.py:1155 #: part/models.py:1157
msgid "BOM line checksum" msgid "BOM line checksum"
msgstr "Prüfsumme der Stückliste" msgstr "Prüfsumme der Stückliste"
#: part/models.py:1218 #: part/models.py:1220
msgid "Part cannot be added to its own Bill of Materials" msgid "Part cannot be added to its own Bill of Materials"
msgstr "Teil kann nicht zu seiner eigenen Stückliste hinzugefügt werden" msgstr "Teil kann nicht zu seiner eigenen Stückliste hinzugefügt werden"
#: part/models.py:1225 #: part/models.py:1227
#, python-brace-format #, python-brace-format
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "Teil '{p1}' wird in Stückliste für Teil '{p2}' benutzt (rekursiv)" msgstr "Teil '{p1}' wird in Stückliste für Teil '{p2}' benutzt (rekursiv)"
#: part/templates/part/allocation.html:10
#, fuzzy
#| msgid "Edit Stock Location"
msgid "Part Stock Allocations"
msgstr "Lagerobjekt-Standort bearbeiten"
#: part/templates/part/allocation.html:14
#: part/templates/part/allocation.html:41
#, fuzzy
#| msgid "On Order"
msgid "Order"
msgstr "bestellt"
#: part/templates/part/allocation.html:15
#: part/templates/part/allocation.html:21
#: part/templates/part/allocation.html:28
#: part/templates/part/allocation.html:45
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr "Lagerobjekt"
#: part/templates/part/allocation.html:20
#: stock/templates/stock/item_base.html:129
#, fuzzy
#| msgid "Build Notes"
msgid "Build Order"
msgstr "Bau-Bemerkungen"
#: part/templates/part/attachments.html:8 #: part/templates/part/attachments.html:8
msgid "Part Attachments" msgid "Part Attachments"
msgstr "Anhänge" msgstr "Anhänge"
@ -2873,7 +2907,7 @@ msgstr "Bewegung der Lagerobjekte bestätigen"
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "Setze das Ziel als Standard-Ziel für ausgewählte Teile" msgstr "Setze das Ziel als Standard-Ziel für ausgewählte Teile"
#: stock/models.py:214 #: stock/models.py:218
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
@ -2881,170 +2915,170 @@ msgstr ""
"Ein Teil mit dieser Seriennummer existiert bereits für die Teilevorlage " "Ein Teil mit dieser Seriennummer existiert bereits für die Teilevorlage "
"{part}" "{part}"
#: stock/models.py:219 #: stock/models.py:223
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "Ein Teil mit dieser Seriennummer existiert bereits" msgstr "Ein Teil mit dieser Seriennummer existiert bereits"
#: stock/models.py:250 #: stock/models.py:254
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "Teile-Typ ('{pf}') muss {pe} sein" msgstr "Teile-Typ ('{pf}') muss {pe} sein"
#: stock/models.py:260 stock/models.py:269 #: stock/models.py:264 stock/models.py:273
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "Anzahl muss für Objekte mit Seriennummer \"1\" sein" msgstr "Anzahl muss für Objekte mit Seriennummer \"1\" sein"
#: stock/models.py:261 #: stock/models.py:265
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
"Seriennummer kann nicht gesetzt werden wenn die Anzahl größer als \"1\" ist" "Seriennummer kann nicht gesetzt werden wenn die Anzahl größer als \"1\" ist"
#: stock/models.py:277 #: stock/models.py:281
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "Lagerobjekt kann nicht für Vorlagen-Teile angelegt werden" msgstr "Lagerobjekt kann nicht für Vorlagen-Teile angelegt werden"
#: stock/models.py:286 #: stock/models.py:290
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "Teil kann nicht zu sich selbst gehören" msgstr "Teil kann nicht zu sich selbst gehören"
#: stock/models.py:323 #: stock/models.py:327
#, fuzzy #, fuzzy
#| msgid "Stock Item" #| msgid "Stock Item"
msgid "Parent Stock Item" msgid "Parent Stock Item"
msgstr "Lagerobjekt" msgstr "Lagerobjekt"
#: stock/models.py:331 #: stock/models.py:335
#, fuzzy #, fuzzy
#| msgid "Base part" #| msgid "Base part"
msgid "Base Part" msgid "Base Part"
msgstr "Basis-Teil" msgstr "Basis-Teil"
#: stock/models.py:332 #: stock/models.py:336
msgid "Base part" msgid "Base part"
msgstr "Basis-Teil" msgstr "Basis-Teil"
#: stock/models.py:342 #: stock/models.py:346
msgid "Select a matching supplier part for this stock item" msgid "Select a matching supplier part for this stock item"
msgstr "Passenden Zulieferer für dieses Lagerobjekt auswählen" msgstr "Passenden Zulieferer für dieses Lagerobjekt auswählen"
#: stock/models.py:347 stock/templates/stock/stock_app_base.html:7 #: stock/models.py:351 stock/templates/stock/stock_app_base.html:7
#, fuzzy #, fuzzy
#| msgid "Stock Locations" #| msgid "Stock Locations"
msgid "Stock Location" msgid "Stock Location"
msgstr "Lagerobjekt-Standorte" msgstr "Lagerobjekt-Standorte"
#: stock/models.py:350 #: stock/models.py:354
msgid "Where is this stock item located?" msgid "Where is this stock item located?"
msgstr "Wo wird dieses Teil normalerweise gelagert?" msgstr "Wo wird dieses Teil normalerweise gelagert?"
#: stock/models.py:355 #: stock/models.py:359
#, fuzzy #, fuzzy
#| msgid "Used In" #| msgid "Used In"
msgid "Installed In" msgid "Installed In"
msgstr "Benutzt in" msgstr "Benutzt in"
#: stock/models.py:358 #: stock/models.py:362
msgid "Is this item installed in another item?" msgid "Is this item installed in another item?"
msgstr "Ist dieses Teil in einem anderen verbaut?" msgstr "Ist dieses Teil in einem anderen verbaut?"
#: stock/models.py:364 #: stock/models.py:368
msgid "Serial number for this item" msgid "Serial number for this item"
msgstr "Seriennummer für dieses Teil" msgstr "Seriennummer für dieses Teil"
#: stock/models.py:376 #: stock/models.py:380
msgid "Batch code for this stock item" msgid "Batch code for this stock item"
msgstr "Losnummer für dieses Lagerobjekt" msgstr "Losnummer für dieses Lagerobjekt"
#: stock/models.py:380 #: stock/models.py:384
#, fuzzy #, fuzzy
#| msgid "Quantity" #| msgid "Quantity"
msgid "Stock Quantity" msgid "Stock Quantity"
msgstr "Anzahl" msgstr "Anzahl"
#: stock/models.py:389 #: stock/models.py:393
#, fuzzy #, fuzzy
#| msgid "Can Build" #| msgid "Can Build"
msgid "Source Build" msgid "Source Build"
msgstr "Herstellbar?" msgstr "Herstellbar?"
#: stock/models.py:391 #: stock/models.py:395
msgid "Build for this stock item" msgid "Build for this stock item"
msgstr "Bau für dieses Lagerobjekt" msgstr "Bau für dieses Lagerobjekt"
#: stock/models.py:398 #: stock/models.py:402
#, fuzzy #, fuzzy
#| msgid "Purchase Order" #| msgid "Purchase Order"
msgid "Source Purchase Order" msgid "Source Purchase Order"
msgstr "Kaufvertrag" msgstr "Kaufvertrag"
#: stock/models.py:401 #: stock/models.py:405
msgid "Purchase order for this stock item" msgid "Purchase order for this stock item"
msgstr "Bestellung für dieses Teil" msgstr "Bestellung für dieses Teil"
#: stock/models.py:407 #: stock/models.py:411
#, fuzzy #, fuzzy
#| msgid "Purchase Order" #| msgid "Purchase Order"
msgid "Destination Sales Order" msgid "Destination Sales Order"
msgstr "Kaufvertrag" msgstr "Kaufvertrag"
#: stock/models.py:414 #: stock/models.py:418
msgid "Destination Build Order" msgid "Destination Build Order"
msgstr "" msgstr ""
#: stock/models.py:427 #: stock/models.py:431
msgid "Delete this Stock Item when stock is depleted" msgid "Delete this Stock Item when stock is depleted"
msgstr "Objekt löschen wenn Lagerbestand aufgebraucht" msgstr "Objekt löschen wenn Lagerbestand aufgebraucht"
#: stock/models.py:437 stock/templates/stock/item_notes.html:13 #: stock/models.py:441 stock/templates/stock/item_notes.html:13
#: stock/templates/stock/item_notes.html:29 #: stock/templates/stock/item_notes.html:29
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "Lagerobjekt-Notizen" msgstr "Lagerobjekt-Notizen"
#: stock/models.py:601 #: stock/models.py:605
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "Anzahl muss eine Ganzzahl sein" msgstr "Anzahl muss eine Ganzzahl sein"
#: stock/models.py:607 #: stock/models.py:611
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "Anzahl darf nicht die verfügbare Anzahl überschreiten ({n})" msgstr "Anzahl darf nicht die verfügbare Anzahl überschreiten ({n})"
#: stock/models.py:610 stock/models.py:613 #: stock/models.py:614 stock/models.py:617
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "Seriennummern muss eine Liste von Ganzzahlen sein" msgstr "Seriennummern muss eine Liste von Ganzzahlen sein"
#: stock/models.py:616 #: stock/models.py:620
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "Anzahl stimmt nicht mit den Seriennummern überein" msgstr "Anzahl stimmt nicht mit den Seriennummern überein"
#: stock/models.py:626 #: stock/models.py:630
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "Seriennummern existieren bereits:" msgstr "Seriennummern existieren bereits:"
#: stock/models.py:648 #: stock/models.py:652
msgid "Add serial number" msgid "Add serial number"
msgstr "Seriennummer hinzufügen" msgstr "Seriennummer hinzufügen"
#: stock/models.py:651 #: stock/models.py:655
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "{n} Teile serialisiert" msgstr "{n} Teile serialisiert"
#: stock/models.py:748 #: stock/models.py:752
#, fuzzy #, fuzzy
#| msgid "Stock item cannot be created for a template Part" #| msgid "Stock item cannot be created for a template Part"
msgid "StockItem cannot be moved as it is not in stock" msgid "StockItem cannot be moved as it is not in stock"
msgstr "Lagerobjekt kann nicht für Vorlagen-Teile angelegt werden" msgstr "Lagerobjekt kann nicht für Vorlagen-Teile angelegt werden"
#: stock/models.py:957 #: stock/models.py:961
msgid "Tracking entry title" msgid "Tracking entry title"
msgstr "Name des Eintrags-Trackings" msgstr "Name des Eintrags-Trackings"
#: stock/models.py:959 #: stock/models.py:963
msgid "Entry notes" msgid "Entry notes"
msgstr "Eintrags-Notizen" msgstr "Eintrags-Notizen"
#: stock/models.py:961 #: stock/models.py:965
msgid "Link to external page for further information" msgid "Link to external page for further information"
msgstr "Link auf externe Seite für weitere Informationen" msgstr "Link auf externe Seite für weitere Informationen"
@ -3052,13 +3086,6 @@ msgstr "Link auf externe Seite für weitere Informationen"
msgid "Stock Tracking Information" msgid "Stock Tracking Information"
msgstr "Informationen zum Lagerbestands-Tracking" msgstr "Informationen zum Lagerbestands-Tracking"
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr "Lagerobjekt"
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
#, fuzzy #, fuzzy
#| msgid "Stock Item to allocate to build" #| msgid "Stock Item to allocate to build"
@ -3100,12 +3127,6 @@ msgstr "Lagerbestands-Details"
msgid "Belongs To" msgid "Belongs To"
msgstr "Gehört zu" msgstr "Gehört zu"
#: stock/templates/stock/item_base.html:129
#, fuzzy
#| msgid "Build Notes"
msgid "Build Order"
msgstr "Bau-Bemerkungen"
#: stock/templates/stock/item_base.html:142 #: stock/templates/stock/item_base.html:142
msgid "Unique Identifier" msgid "Unique Identifier"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-27 23:38+0000\n" "POT-Creation-Date: 2020-04-28 00:43+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -263,7 +263,7 @@ msgstr ""
msgid "Build status code" msgid "Build status code"
msgstr "" msgstr ""
#: build/models.py:120 stock/models.py:374 #: build/models.py:120 stock/models.py:378
msgid "Batch Code" msgid "Batch Code"
msgstr "" msgstr ""
@ -275,11 +275,11 @@ msgstr ""
#: company/templates/company/supplier_part_base.html:57 #: company/templates/company/supplier_part_base.html:57
#: company/templates/company/supplier_part_detail.html:24 #: company/templates/company/supplier_part_detail.html:24
#: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85
#: stock/models.py:368 stock/templates/stock/item_base.html:190 #: stock/models.py:372 stock/templates/stock/item_base.html:190
msgid "External Link" msgid "External Link"
msgstr "" msgstr ""
#: build/models.py:140 stock/models.py:370 #: build/models.py:140 stock/models.py:374
msgid "Link to external URL" msgid "Link to external URL"
msgstr "" msgstr ""
@ -287,7 +287,7 @@ msgstr ""
#: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15 #: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15
#: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/purchase_order_detail.html:200
#: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63
#: stock/models.py:436 stock/templates/stock/tabs.html:17 #: stock/models.py:440 stock/templates/stock/tabs.html:17
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
@ -352,7 +352,7 @@ msgstr ""
#: build/templates/build/allocate.html:161 #: build/templates/build/allocate.html:161
#: order/templates/order/sales_order_detail.html:68 #: order/templates/order/sales_order_detail.html:68
#: order/templates/order/sales_order_detail.html:150 stock/models.py:362 #: order/templates/order/sales_order_detail.html:150 stock/models.py:366
#: stock/templates/stock/item_base.html:149 #: stock/templates/stock/item_base.html:149
msgid "Serial Number" msgid "Serial Number"
msgstr "" msgstr ""
@ -366,6 +366,8 @@ msgstr ""
#: order/templates/order/purchase_order_detail.html:175 #: order/templates/order/purchase_order_detail.html:175
#: order/templates/order/sales_order_detail.html:70 #: order/templates/order/sales_order_detail.html:70
#: order/templates/order/sales_order_detail.html:152 #: order/templates/order/sales_order_detail.html:152
#: part/templates/part/allocation.html:16
#: part/templates/part/allocation.html:49
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
#: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:26
#: stock/templates/stock/item_base.html:155 #: stock/templates/stock/item_base.html:155
@ -477,6 +479,7 @@ msgstr ""
#: order/templates/order/sales_order_base.html:33 #: order/templates/order/sales_order_base.html:33
#: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_notes.html:10
#: order/templates/order/sales_order_ship.html:25 #: order/templates/order/sales_order_ship.html:25
#: part/templates/part/allocation.html:27
#: stock/templates/stock/item_base.html:123 #: stock/templates/stock/item_base.html:123
msgid "Sales Order" msgid "Sales Order"
msgstr "" msgstr ""
@ -991,7 +994,7 @@ msgid "New Sales Order"
msgstr "" msgstr ""
#: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:6
#: company/templates/company/supplier_part_base.html:19 stock/models.py:341 #: company/templates/company/supplier_part_base.html:19 stock/models.py:345
#: stock/templates/stock/item_base.html:202 #: stock/templates/stock/item_base.html:202
msgid "Supplier Part" msgid "Supplier Part"
msgstr "" msgstr ""
@ -1223,7 +1226,7 @@ msgid "Supplier order reference code"
msgstr "" msgstr ""
#: order/models.py:148 order/models.py:222 part/views.py:1113 #: order/models.py:148 order/models.py:222 part/views.py:1113
#: stock/models.py:604 #: stock/models.py:608
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -1735,175 +1738,200 @@ msgstr ""
msgid "Select currency for price calculation" msgid "Select currency for price calculation"
msgstr "" msgstr ""
#: part/models.py:62 #: part/models.py:64
msgid "Default location for parts in this category" msgid "Default location for parts in this category"
msgstr "" msgstr ""
#: part/models.py:65 #: part/models.py:67
msgid "Default keywords for parts in this category" msgid "Default keywords for parts in this category"
msgstr "" msgstr ""
#: part/models.py:339 #: part/models.py:341
msgid "Part must be unique for name, IPN and revision" msgid "Part must be unique for name, IPN and revision"
msgstr "" msgstr ""
#: part/models.py:353 #: part/models.py:355
msgid "Part cannot be a template part if it is a variant of another part" msgid "Part cannot be a template part if it is a variant of another part"
msgstr "" msgstr ""
#: part/models.py:354 #: part/models.py:356
msgid "Part cannot be a variant of another part if it is already a template" msgid "Part cannot be a variant of another part if it is already a template"
msgstr "" msgstr ""
#: part/models.py:358 part/templates/part/detail.html:19 #: part/models.py:360 part/templates/part/detail.html:19
msgid "Part name" msgid "Part name"
msgstr "" msgstr ""
#: part/models.py:362 #: part/models.py:364
msgid "Is this part a template part?" msgid "Is this part a template part?"
msgstr "" msgstr ""
#: part/models.py:371 #: part/models.py:373
msgid "Is this part a variant of another part?" msgid "Is this part a variant of another part?"
msgstr "" msgstr ""
#: part/models.py:373 #: part/models.py:375
msgid "Part description" msgid "Part description"
msgstr "" msgstr ""
#: part/models.py:375 #: part/models.py:377
msgid "Part keywords to improve visibility in search results" msgid "Part keywords to improve visibility in search results"
msgstr "" msgstr ""
#: part/models.py:380 #: part/models.py:382
msgid "Part category" msgid "Part category"
msgstr "" msgstr ""
#: part/models.py:382 #: part/models.py:384
msgid "Internal Part Number" msgid "Internal Part Number"
msgstr "" msgstr ""
#: part/models.py:384 #: part/models.py:386
msgid "Part revision or version number" msgid "Part revision or version number"
msgstr "" msgstr ""
#: part/models.py:386 #: part/models.py:388
msgid "Link to extenal URL" msgid "Link to extenal URL"
msgstr "" msgstr ""
#: part/models.py:398 #: part/models.py:400
msgid "Where is this item normally stored?" msgid "Where is this item normally stored?"
msgstr "" msgstr ""
#: part/models.py:442 #: part/models.py:444
msgid "Default supplier part" msgid "Default supplier part"
msgstr "" msgstr ""
#: part/models.py:445 #: part/models.py:447
msgid "Minimum allowed stock level" msgid "Minimum allowed stock level"
msgstr "" msgstr ""
#: part/models.py:447 #: part/models.py:449
msgid "Stock keeping units for this part" msgid "Stock keeping units for this part"
msgstr "" msgstr ""
#: part/models.py:449 #: part/models.py:451
msgid "Can this part be built from other parts?" msgid "Can this part be built from other parts?"
msgstr "" msgstr ""
#: part/models.py:451 #: part/models.py:453
msgid "Can this part be used to build other parts?" msgid "Can this part be used to build other parts?"
msgstr "" msgstr ""
#: part/models.py:453 #: part/models.py:455
msgid "Does this part have tracking for unique items?" msgid "Does this part have tracking for unique items?"
msgstr "" msgstr ""
#: part/models.py:455 #: part/models.py:457
msgid "Can this part be purchased from external suppliers?" msgid "Can this part be purchased from external suppliers?"
msgstr "" msgstr ""
#: part/models.py:457 #: part/models.py:459
msgid "Can this part be sold to customers?" msgid "Can this part be sold to customers?"
msgstr "" msgstr ""
#: part/models.py:459 #: part/models.py:461
msgid "Is this part active?" msgid "Is this part active?"
msgstr "" msgstr ""
#: part/models.py:461 #: part/models.py:463
msgid "Is this a virtual part, such as a software product or license?" msgid "Is this a virtual part, such as a software product or license?"
msgstr "" msgstr ""
#: part/models.py:463 #: part/models.py:465
msgid "Part notes - supports Markdown formatting" msgid "Part notes - supports Markdown formatting"
msgstr "" msgstr ""
#: part/models.py:465 #: part/models.py:467
msgid "Stored BOM checksum" msgid "Stored BOM checksum"
msgstr "" msgstr ""
#: part/models.py:1067 #: part/models.py:1069
msgid "Parameter template name must be unique" msgid "Parameter template name must be unique"
msgstr "" msgstr ""
#: part/models.py:1072 #: part/models.py:1074
msgid "Parameter Name" msgid "Parameter Name"
msgstr "" msgstr ""
#: part/models.py:1074 #: part/models.py:1076
msgid "Parameter Units" msgid "Parameter Units"
msgstr "" msgstr ""
#: part/models.py:1100 #: part/models.py:1102
msgid "Parent Part" msgid "Parent Part"
msgstr "" msgstr ""
#: part/models.py:1102 #: part/models.py:1104
msgid "Parameter Template" msgid "Parameter Template"
msgstr "" msgstr ""
#: part/models.py:1104 #: part/models.py:1106
msgid "Parameter Value" msgid "Parameter Value"
msgstr "" msgstr ""
#: part/models.py:1128 #: part/models.py:1130
msgid "Select parent part" msgid "Select parent part"
msgstr "" msgstr ""
#: part/models.py:1137 #: part/models.py:1139
msgid "Select part to be used in BOM" msgid "Select part to be used in BOM"
msgstr "" msgstr ""
#: part/models.py:1144 #: part/models.py:1146
msgid "BOM quantity for this BOM item" msgid "BOM quantity for this BOM item"
msgstr "" msgstr ""
#: part/models.py:1147 #: part/models.py:1149
msgid "Estimated build wastage quantity (absolute or percentage)" msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr "" msgstr ""
#: part/models.py:1150 #: part/models.py:1152
msgid "BOM item reference" msgid "BOM item reference"
msgstr "" msgstr ""
#: part/models.py:1153 #: part/models.py:1155
msgid "BOM item notes" msgid "BOM item notes"
msgstr "" msgstr ""
#: part/models.py:1155 #: part/models.py:1157
msgid "BOM line checksum" msgid "BOM line checksum"
msgstr "" msgstr ""
#: part/models.py:1218 #: part/models.py:1220
msgid "Part cannot be added to its own Bill of Materials" msgid "Part cannot be added to its own Bill of Materials"
msgstr "" msgstr ""
#: part/models.py:1225 #: part/models.py:1227
#, python-brace-format #, python-brace-format
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "" msgstr ""
#: part/templates/part/allocation.html:10
msgid "Part Stock Allocations"
msgstr ""
#: part/templates/part/allocation.html:14
#: part/templates/part/allocation.html:41
msgid "Order"
msgstr ""
#: part/templates/part/allocation.html:15
#: part/templates/part/allocation.html:21
#: part/templates/part/allocation.html:28
#: part/templates/part/allocation.html:45
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr ""
#: part/templates/part/allocation.html:20
#: stock/templates/stock/item_base.html:129
msgid "Build Order"
msgstr ""
#: part/templates/part/attachments.html:8 #: part/templates/part/attachments.html:8
msgid "Part Attachments" msgid "Part Attachments"
msgstr "" msgstr ""
@ -2438,157 +2466,157 @@ msgstr ""
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "" msgstr ""
#: stock/models.py:214 #: stock/models.py:218
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
msgstr "" msgstr ""
#: stock/models.py:219 #: stock/models.py:223
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "" msgstr ""
#: stock/models.py:250 #: stock/models.py:254
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "" msgstr ""
#: stock/models.py:260 stock/models.py:269 #: stock/models.py:264 stock/models.py:273
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "" msgstr ""
#: stock/models.py:261 #: stock/models.py:265
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
#: stock/models.py:277 #: stock/models.py:281
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "" msgstr ""
#: stock/models.py:286 #: stock/models.py:290
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "" msgstr ""
#: stock/models.py:323 #: stock/models.py:327
msgid "Parent Stock Item" msgid "Parent Stock Item"
msgstr "" msgstr ""
#: stock/models.py:331 #: stock/models.py:335
msgid "Base Part" msgid "Base Part"
msgstr "" msgstr ""
#: stock/models.py:332 #: stock/models.py:336
msgid "Base part" msgid "Base part"
msgstr "" msgstr ""
#: stock/models.py:342 #: stock/models.py:346
msgid "Select a matching supplier part for this stock item" msgid "Select a matching supplier part for this stock item"
msgstr "" msgstr ""
#: stock/models.py:347 stock/templates/stock/stock_app_base.html:7 #: stock/models.py:351 stock/templates/stock/stock_app_base.html:7
msgid "Stock Location" msgid "Stock Location"
msgstr "" msgstr ""
#: stock/models.py:350 #: stock/models.py:354
msgid "Where is this stock item located?" msgid "Where is this stock item located?"
msgstr "" msgstr ""
#: stock/models.py:355 #: stock/models.py:359
msgid "Installed In" msgid "Installed In"
msgstr "" msgstr ""
#: stock/models.py:358 #: stock/models.py:362
msgid "Is this item installed in another item?" msgid "Is this item installed in another item?"
msgstr "" msgstr ""
#: stock/models.py:364 #: stock/models.py:368
msgid "Serial number for this item" msgid "Serial number for this item"
msgstr "" msgstr ""
#: stock/models.py:376 #: stock/models.py:380
msgid "Batch code for this stock item" msgid "Batch code for this stock item"
msgstr "" msgstr ""
#: stock/models.py:380 #: stock/models.py:384
msgid "Stock Quantity" msgid "Stock Quantity"
msgstr "" msgstr ""
#: stock/models.py:389 #: stock/models.py:393
msgid "Source Build" msgid "Source Build"
msgstr "" msgstr ""
#: stock/models.py:391 #: stock/models.py:395
msgid "Build for this stock item" msgid "Build for this stock item"
msgstr "" msgstr ""
#: stock/models.py:398 #: stock/models.py:402
msgid "Source Purchase Order" msgid "Source Purchase Order"
msgstr "" msgstr ""
#: stock/models.py:401 #: stock/models.py:405
msgid "Purchase order for this stock item" msgid "Purchase order for this stock item"
msgstr "" msgstr ""
#: stock/models.py:407 #: stock/models.py:411
msgid "Destination Sales Order" msgid "Destination Sales Order"
msgstr "" msgstr ""
#: stock/models.py:414 #: stock/models.py:418
msgid "Destination Build Order" msgid "Destination Build Order"
msgstr "" msgstr ""
#: stock/models.py:427 #: stock/models.py:431
msgid "Delete this Stock Item when stock is depleted" msgid "Delete this Stock Item when stock is depleted"
msgstr "" msgstr ""
#: stock/models.py:437 stock/templates/stock/item_notes.html:13 #: stock/models.py:441 stock/templates/stock/item_notes.html:13
#: stock/templates/stock/item_notes.html:29 #: stock/templates/stock/item_notes.html:29
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "" msgstr ""
#: stock/models.py:601 #: stock/models.py:605
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "" msgstr ""
#: stock/models.py:607 #: stock/models.py:611
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "" msgstr ""
#: stock/models.py:610 stock/models.py:613 #: stock/models.py:614 stock/models.py:617
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "" msgstr ""
#: stock/models.py:616 #: stock/models.py:620
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "" msgstr ""
#: stock/models.py:626 #: stock/models.py:630
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "" msgstr ""
#: stock/models.py:648 #: stock/models.py:652
msgid "Add serial number" msgid "Add serial number"
msgstr "" msgstr ""
#: stock/models.py:651 #: stock/models.py:655
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
#: stock/models.py:748 #: stock/models.py:752
msgid "StockItem cannot be moved as it is not in stock" msgid "StockItem cannot be moved as it is not in stock"
msgstr "" msgstr ""
#: stock/models.py:957 #: stock/models.py:961
msgid "Tracking entry title" msgid "Tracking entry title"
msgstr "" msgstr ""
#: stock/models.py:959 #: stock/models.py:963
msgid "Entry notes" msgid "Entry notes"
msgstr "" msgstr ""
#: stock/models.py:961 #: stock/models.py:965
msgid "Link to external page for further information" msgid "Link to external page for further information"
msgstr "" msgstr ""
@ -2596,13 +2624,6 @@ msgstr ""
msgid "Stock Tracking Information" msgid "Stock Tracking Information"
msgstr "" msgstr ""
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr ""
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
msgid "This stock item is allocated to Sales Order" msgid "This stock item is allocated to Sales Order"
msgstr "" msgstr ""
@ -2634,10 +2655,6 @@ msgstr ""
msgid "Belongs To" msgid "Belongs To"
msgstr "" msgstr ""
#: stock/templates/stock/item_base.html:129
msgid "Build Order"
msgstr ""
#: stock/templates/stock/item_base.html:142 #: stock/templates/stock/item_base.html:142
msgid "Unique Identifier" msgid "Unique Identifier"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-27 23:38+0000\n" "POT-Creation-Date: 2020-04-28 00:43+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -263,7 +263,7 @@ msgstr ""
msgid "Build status code" msgid "Build status code"
msgstr "" msgstr ""
#: build/models.py:120 stock/models.py:374 #: build/models.py:120 stock/models.py:378
msgid "Batch Code" msgid "Batch Code"
msgstr "" msgstr ""
@ -275,11 +275,11 @@ msgstr ""
#: company/templates/company/supplier_part_base.html:57 #: company/templates/company/supplier_part_base.html:57
#: company/templates/company/supplier_part_detail.html:24 #: company/templates/company/supplier_part_detail.html:24
#: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85
#: stock/models.py:368 stock/templates/stock/item_base.html:190 #: stock/models.py:372 stock/templates/stock/item_base.html:190
msgid "External Link" msgid "External Link"
msgstr "" msgstr ""
#: build/models.py:140 stock/models.py:370 #: build/models.py:140 stock/models.py:374
msgid "Link to external URL" msgid "Link to external URL"
msgstr "" msgstr ""
@ -287,7 +287,7 @@ msgstr ""
#: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15 #: company/templates/company/tabs.html:26 order/templates/order/po_tabs.html:15
#: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/purchase_order_detail.html:200
#: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63
#: stock/models.py:436 stock/templates/stock/tabs.html:17 #: stock/models.py:440 stock/templates/stock/tabs.html:17
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
@ -352,7 +352,7 @@ msgstr ""
#: build/templates/build/allocate.html:161 #: build/templates/build/allocate.html:161
#: order/templates/order/sales_order_detail.html:68 #: order/templates/order/sales_order_detail.html:68
#: order/templates/order/sales_order_detail.html:150 stock/models.py:362 #: order/templates/order/sales_order_detail.html:150 stock/models.py:366
#: stock/templates/stock/item_base.html:149 #: stock/templates/stock/item_base.html:149
msgid "Serial Number" msgid "Serial Number"
msgstr "" msgstr ""
@ -366,6 +366,8 @@ msgstr ""
#: order/templates/order/purchase_order_detail.html:175 #: order/templates/order/purchase_order_detail.html:175
#: order/templates/order/sales_order_detail.html:70 #: order/templates/order/sales_order_detail.html:70
#: order/templates/order/sales_order_detail.html:152 #: order/templates/order/sales_order_detail.html:152
#: part/templates/part/allocation.html:16
#: part/templates/part/allocation.html:49
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
#: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:26
#: stock/templates/stock/item_base.html:155 #: stock/templates/stock/item_base.html:155
@ -477,6 +479,7 @@ msgstr ""
#: order/templates/order/sales_order_base.html:33 #: order/templates/order/sales_order_base.html:33
#: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_notes.html:10
#: order/templates/order/sales_order_ship.html:25 #: order/templates/order/sales_order_ship.html:25
#: part/templates/part/allocation.html:27
#: stock/templates/stock/item_base.html:123 #: stock/templates/stock/item_base.html:123
msgid "Sales Order" msgid "Sales Order"
msgstr "" msgstr ""
@ -991,7 +994,7 @@ msgid "New Sales Order"
msgstr "" msgstr ""
#: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:6
#: company/templates/company/supplier_part_base.html:19 stock/models.py:341 #: company/templates/company/supplier_part_base.html:19 stock/models.py:345
#: stock/templates/stock/item_base.html:202 #: stock/templates/stock/item_base.html:202
msgid "Supplier Part" msgid "Supplier Part"
msgstr "" msgstr ""
@ -1223,7 +1226,7 @@ msgid "Supplier order reference code"
msgstr "" msgstr ""
#: order/models.py:148 order/models.py:222 part/views.py:1113 #: order/models.py:148 order/models.py:222 part/views.py:1113
#: stock/models.py:604 #: stock/models.py:608
msgid "Quantity must be greater than zero" msgid "Quantity must be greater than zero"
msgstr "" msgstr ""
@ -1735,175 +1738,200 @@ msgstr ""
msgid "Select currency for price calculation" msgid "Select currency for price calculation"
msgstr "" msgstr ""
#: part/models.py:62 #: part/models.py:64
msgid "Default location for parts in this category" msgid "Default location for parts in this category"
msgstr "" msgstr ""
#: part/models.py:65 #: part/models.py:67
msgid "Default keywords for parts in this category" msgid "Default keywords for parts in this category"
msgstr "" msgstr ""
#: part/models.py:339 #: part/models.py:341
msgid "Part must be unique for name, IPN and revision" msgid "Part must be unique for name, IPN and revision"
msgstr "" msgstr ""
#: part/models.py:353 #: part/models.py:355
msgid "Part cannot be a template part if it is a variant of another part" msgid "Part cannot be a template part if it is a variant of another part"
msgstr "" msgstr ""
#: part/models.py:354 #: part/models.py:356
msgid "Part cannot be a variant of another part if it is already a template" msgid "Part cannot be a variant of another part if it is already a template"
msgstr "" msgstr ""
#: part/models.py:358 part/templates/part/detail.html:19 #: part/models.py:360 part/templates/part/detail.html:19
msgid "Part name" msgid "Part name"
msgstr "" msgstr ""
#: part/models.py:362 #: part/models.py:364
msgid "Is this part a template part?" msgid "Is this part a template part?"
msgstr "" msgstr ""
#: part/models.py:371 #: part/models.py:373
msgid "Is this part a variant of another part?" msgid "Is this part a variant of another part?"
msgstr "" msgstr ""
#: part/models.py:373 #: part/models.py:375
msgid "Part description" msgid "Part description"
msgstr "" msgstr ""
#: part/models.py:375 #: part/models.py:377
msgid "Part keywords to improve visibility in search results" msgid "Part keywords to improve visibility in search results"
msgstr "" msgstr ""
#: part/models.py:380 #: part/models.py:382
msgid "Part category" msgid "Part category"
msgstr "" msgstr ""
#: part/models.py:382 #: part/models.py:384
msgid "Internal Part Number" msgid "Internal Part Number"
msgstr "" msgstr ""
#: part/models.py:384 #: part/models.py:386
msgid "Part revision or version number" msgid "Part revision or version number"
msgstr "" msgstr ""
#: part/models.py:386 #: part/models.py:388
msgid "Link to extenal URL" msgid "Link to extenal URL"
msgstr "" msgstr ""
#: part/models.py:398 #: part/models.py:400
msgid "Where is this item normally stored?" msgid "Where is this item normally stored?"
msgstr "" msgstr ""
#: part/models.py:442 #: part/models.py:444
msgid "Default supplier part" msgid "Default supplier part"
msgstr "" msgstr ""
#: part/models.py:445 #: part/models.py:447
msgid "Minimum allowed stock level" msgid "Minimum allowed stock level"
msgstr "" msgstr ""
#: part/models.py:447 #: part/models.py:449
msgid "Stock keeping units for this part" msgid "Stock keeping units for this part"
msgstr "" msgstr ""
#: part/models.py:449 #: part/models.py:451
msgid "Can this part be built from other parts?" msgid "Can this part be built from other parts?"
msgstr "" msgstr ""
#: part/models.py:451 #: part/models.py:453
msgid "Can this part be used to build other parts?" msgid "Can this part be used to build other parts?"
msgstr "" msgstr ""
#: part/models.py:453 #: part/models.py:455
msgid "Does this part have tracking for unique items?" msgid "Does this part have tracking for unique items?"
msgstr "" msgstr ""
#: part/models.py:455 #: part/models.py:457
msgid "Can this part be purchased from external suppliers?" msgid "Can this part be purchased from external suppliers?"
msgstr "" msgstr ""
#: part/models.py:457 #: part/models.py:459
msgid "Can this part be sold to customers?" msgid "Can this part be sold to customers?"
msgstr "" msgstr ""
#: part/models.py:459 #: part/models.py:461
msgid "Is this part active?" msgid "Is this part active?"
msgstr "" msgstr ""
#: part/models.py:461 #: part/models.py:463
msgid "Is this a virtual part, such as a software product or license?" msgid "Is this a virtual part, such as a software product or license?"
msgstr "" msgstr ""
#: part/models.py:463 #: part/models.py:465
msgid "Part notes - supports Markdown formatting" msgid "Part notes - supports Markdown formatting"
msgstr "" msgstr ""
#: part/models.py:465 #: part/models.py:467
msgid "Stored BOM checksum" msgid "Stored BOM checksum"
msgstr "" msgstr ""
#: part/models.py:1067 #: part/models.py:1069
msgid "Parameter template name must be unique" msgid "Parameter template name must be unique"
msgstr "" msgstr ""
#: part/models.py:1072 #: part/models.py:1074
msgid "Parameter Name" msgid "Parameter Name"
msgstr "" msgstr ""
#: part/models.py:1074 #: part/models.py:1076
msgid "Parameter Units" msgid "Parameter Units"
msgstr "" msgstr ""
#: part/models.py:1100 #: part/models.py:1102
msgid "Parent Part" msgid "Parent Part"
msgstr "" msgstr ""
#: part/models.py:1102 #: part/models.py:1104
msgid "Parameter Template" msgid "Parameter Template"
msgstr "" msgstr ""
#: part/models.py:1104 #: part/models.py:1106
msgid "Parameter Value" msgid "Parameter Value"
msgstr "" msgstr ""
#: part/models.py:1128 #: part/models.py:1130
msgid "Select parent part" msgid "Select parent part"
msgstr "" msgstr ""
#: part/models.py:1137 #: part/models.py:1139
msgid "Select part to be used in BOM" msgid "Select part to be used in BOM"
msgstr "" msgstr ""
#: part/models.py:1144 #: part/models.py:1146
msgid "BOM quantity for this BOM item" msgid "BOM quantity for this BOM item"
msgstr "" msgstr ""
#: part/models.py:1147 #: part/models.py:1149
msgid "Estimated build wastage quantity (absolute or percentage)" msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr "" msgstr ""
#: part/models.py:1150 #: part/models.py:1152
msgid "BOM item reference" msgid "BOM item reference"
msgstr "" msgstr ""
#: part/models.py:1153 #: part/models.py:1155
msgid "BOM item notes" msgid "BOM item notes"
msgstr "" msgstr ""
#: part/models.py:1155 #: part/models.py:1157
msgid "BOM line checksum" msgid "BOM line checksum"
msgstr "" msgstr ""
#: part/models.py:1218 #: part/models.py:1220
msgid "Part cannot be added to its own Bill of Materials" msgid "Part cannot be added to its own Bill of Materials"
msgstr "" msgstr ""
#: part/models.py:1225 #: part/models.py:1227
#, python-brace-format #, python-brace-format
msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)" msgid "Part '{p1}' is used in BOM for '{p2}' (recursive)"
msgstr "" msgstr ""
#: part/templates/part/allocation.html:10
msgid "Part Stock Allocations"
msgstr ""
#: part/templates/part/allocation.html:14
#: part/templates/part/allocation.html:41
msgid "Order"
msgstr ""
#: part/templates/part/allocation.html:15
#: part/templates/part/allocation.html:21
#: part/templates/part/allocation.html:28
#: part/templates/part/allocation.html:45
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr ""
#: part/templates/part/allocation.html:20
#: stock/templates/stock/item_base.html:129
msgid "Build Order"
msgstr ""
#: part/templates/part/attachments.html:8 #: part/templates/part/attachments.html:8
msgid "Part Attachments" msgid "Part Attachments"
msgstr "" msgstr ""
@ -2438,157 +2466,157 @@ msgstr ""
msgid "Set the destination as the default location for selected parts" msgid "Set the destination as the default location for selected parts"
msgstr "" msgstr ""
#: stock/models.py:214 #: stock/models.py:218
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"A stock item with this serial number already exists for template part {part}" "A stock item with this serial number already exists for template part {part}"
msgstr "" msgstr ""
#: stock/models.py:219 #: stock/models.py:223
msgid "A stock item with this serial number already exists" msgid "A stock item with this serial number already exists"
msgstr "" msgstr ""
#: stock/models.py:250 #: stock/models.py:254
#, python-brace-format #, python-brace-format
msgid "Part type ('{pf}') must be {pe}" msgid "Part type ('{pf}') must be {pe}"
msgstr "" msgstr ""
#: stock/models.py:260 stock/models.py:269 #: stock/models.py:264 stock/models.py:273
msgid "Quantity must be 1 for item with a serial number" msgid "Quantity must be 1 for item with a serial number"
msgstr "" msgstr ""
#: stock/models.py:261 #: stock/models.py:265
msgid "Serial number cannot be set if quantity greater than 1" msgid "Serial number cannot be set if quantity greater than 1"
msgstr "" msgstr ""
#: stock/models.py:277 #: stock/models.py:281
msgid "Stock item cannot be created for a template Part" msgid "Stock item cannot be created for a template Part"
msgstr "" msgstr ""
#: stock/models.py:286 #: stock/models.py:290
msgid "Item cannot belong to itself" msgid "Item cannot belong to itself"
msgstr "" msgstr ""
#: stock/models.py:323 #: stock/models.py:327
msgid "Parent Stock Item" msgid "Parent Stock Item"
msgstr "" msgstr ""
#: stock/models.py:331 #: stock/models.py:335
msgid "Base Part" msgid "Base Part"
msgstr "" msgstr ""
#: stock/models.py:332 #: stock/models.py:336
msgid "Base part" msgid "Base part"
msgstr "" msgstr ""
#: stock/models.py:342 #: stock/models.py:346
msgid "Select a matching supplier part for this stock item" msgid "Select a matching supplier part for this stock item"
msgstr "" msgstr ""
#: stock/models.py:347 stock/templates/stock/stock_app_base.html:7 #: stock/models.py:351 stock/templates/stock/stock_app_base.html:7
msgid "Stock Location" msgid "Stock Location"
msgstr "" msgstr ""
#: stock/models.py:350 #: stock/models.py:354
msgid "Where is this stock item located?" msgid "Where is this stock item located?"
msgstr "" msgstr ""
#: stock/models.py:355 #: stock/models.py:359
msgid "Installed In" msgid "Installed In"
msgstr "" msgstr ""
#: stock/models.py:358 #: stock/models.py:362
msgid "Is this item installed in another item?" msgid "Is this item installed in another item?"
msgstr "" msgstr ""
#: stock/models.py:364 #: stock/models.py:368
msgid "Serial number for this item" msgid "Serial number for this item"
msgstr "" msgstr ""
#: stock/models.py:376 #: stock/models.py:380
msgid "Batch code for this stock item" msgid "Batch code for this stock item"
msgstr "" msgstr ""
#: stock/models.py:380 #: stock/models.py:384
msgid "Stock Quantity" msgid "Stock Quantity"
msgstr "" msgstr ""
#: stock/models.py:389 #: stock/models.py:393
msgid "Source Build" msgid "Source Build"
msgstr "" msgstr ""
#: stock/models.py:391 #: stock/models.py:395
msgid "Build for this stock item" msgid "Build for this stock item"
msgstr "" msgstr ""
#: stock/models.py:398 #: stock/models.py:402
msgid "Source Purchase Order" msgid "Source Purchase Order"
msgstr "" msgstr ""
#: stock/models.py:401 #: stock/models.py:405
msgid "Purchase order for this stock item" msgid "Purchase order for this stock item"
msgstr "" msgstr ""
#: stock/models.py:407 #: stock/models.py:411
msgid "Destination Sales Order" msgid "Destination Sales Order"
msgstr "" msgstr ""
#: stock/models.py:414 #: stock/models.py:418
msgid "Destination Build Order" msgid "Destination Build Order"
msgstr "" msgstr ""
#: stock/models.py:427 #: stock/models.py:431
msgid "Delete this Stock Item when stock is depleted" msgid "Delete this Stock Item when stock is depleted"
msgstr "" msgstr ""
#: stock/models.py:437 stock/templates/stock/item_notes.html:13 #: stock/models.py:441 stock/templates/stock/item_notes.html:13
#: stock/templates/stock/item_notes.html:29 #: stock/templates/stock/item_notes.html:29
msgid "Stock Item Notes" msgid "Stock Item Notes"
msgstr "" msgstr ""
#: stock/models.py:601 #: stock/models.py:605
msgid "Quantity must be integer" msgid "Quantity must be integer"
msgstr "" msgstr ""
#: stock/models.py:607 #: stock/models.py:611
#, python-brace-format #, python-brace-format
msgid "Quantity must not exceed available stock quantity ({n})" msgid "Quantity must not exceed available stock quantity ({n})"
msgstr "" msgstr ""
#: stock/models.py:610 stock/models.py:613 #: stock/models.py:614 stock/models.py:617
msgid "Serial numbers must be a list of integers" msgid "Serial numbers must be a list of integers"
msgstr "" msgstr ""
#: stock/models.py:616 #: stock/models.py:620
msgid "Quantity does not match serial numbers" msgid "Quantity does not match serial numbers"
msgstr "" msgstr ""
#: stock/models.py:626 #: stock/models.py:630
msgid "Serial numbers already exist: " msgid "Serial numbers already exist: "
msgstr "" msgstr ""
#: stock/models.py:648 #: stock/models.py:652
msgid "Add serial number" msgid "Add serial number"
msgstr "" msgstr ""
#: stock/models.py:651 #: stock/models.py:655
#, python-brace-format #, python-brace-format
msgid "Serialized {n} items" msgid "Serialized {n} items"
msgstr "" msgstr ""
#: stock/models.py:748 #: stock/models.py:752
msgid "StockItem cannot be moved as it is not in stock" msgid "StockItem cannot be moved as it is not in stock"
msgstr "" msgstr ""
#: stock/models.py:957 #: stock/models.py:961
msgid "Tracking entry title" msgid "Tracking entry title"
msgstr "" msgstr ""
#: stock/models.py:959 #: stock/models.py:963
msgid "Entry notes" msgid "Entry notes"
msgstr "" msgstr ""
#: stock/models.py:961 #: stock/models.py:965
msgid "Link to external page for further information" msgid "Link to external page for further information"
msgstr "" msgstr ""
@ -2596,13 +2624,6 @@ msgstr ""
msgid "Stock Tracking Information" msgid "Stock Tracking Information"
msgstr "" msgstr ""
#: stock/templates/stock/item_base.html:8
#: stock/templates/stock/item_base.html:52
#: stock/templates/stock/item_base.html:184
#: stock/templates/stock/stock_adjust.html:16
msgid "Stock Item"
msgstr ""
#: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:20
msgid "This stock item is allocated to Sales Order" msgid "This stock item is allocated to Sales Order"
msgstr "" msgstr ""
@ -2634,10 +2655,6 @@ msgstr ""
msgid "Belongs To" msgid "Belongs To"
msgstr "" msgstr ""
#: stock/templates/stock/item_base.html:129
msgid "Build Order"
msgstr ""
#: stock/templates/stock/item_base.html:142 #: stock/templates/stock/item_base.html:142
msgid "Unique Identifier" msgid "Unique Identifier"
msgstr "" msgstr ""

View File

@ -14,7 +14,6 @@ from django.urls import reverse
from django.db import models, transaction from django.db import models, transaction
from django.db.models import Sum from django.db.models import Sum
from django.db.models.functions import Coalesce from django.db.models.functions import Coalesce
from django.db.models import prefetch_related_objects
from django.core.validators import MinValueValidator from django.core.validators import MinValueValidator
from django.contrib.auth.models import User from django.contrib.auth.models import User
@ -628,7 +627,6 @@ class Part(models.Model):
return query['total'] return query['total']
def allocation_count(self): def allocation_count(self):
""" """
Return the total quantity of stock allocated for this part, Return the total quantity of stock allocated for this part,

View File

@ -1,6 +1,7 @@
{% extends "part/part_base.html" %} {% extends "part/part_base.html" %}
{% load status_codes %} {% load status_codes %}
{% load i18n %} {% load i18n %}
{% load inventree_extras %}
{% block details %} {% block details %}
@ -10,17 +11,22 @@
<table class='table table-striped table-condensed' id='build-table'> <table class='table table-striped table-condensed' id='build-table'>
<tr> <tr>
<th>Build</th> <th>{% trans "Order" %}</th>
<th>Making</th> <th>{% trans "Stock Item" %}</th>
<th>Allocated</th> <th>{% trans "Quantity" %}</th>
<th>Status</th>
</tr> </tr>
{% for allocation in part.build_allocation %} {% for allocation in part.build_order_allocations %}
<tr> <tr>
<td><a href="{% url 'build-detail' allocation.build.id %}">{{ allocation.build.title }}</a></td> <td><a href="{% url 'build-detail' allocation.build.id %}">{% trans "Build Order" %}: {{ allocation.build.pk }}</a></td>
<td>{{ allocation.build.quantity }} &times <a href="{% url 'part-detail' allocation.build.part.id %}">{{ allocation.build.part.full_name }}</a></td> <td><a href="{% url 'stock-item-detail' allocation.stock_item.id %}">{% trans "Stock Item" %}: {{ allocation.stock_item.id }}</a></td>
<td>{{ allocation.quantity }}</td> <td>{% decimal allocation.quantity %}</td>
<td>{% build_status_label allocation.build.status %}</td> </tr>
{% endfor %}
{% for allocation in part.sales_order_allocations %}
<tr>
<td><a href="{% url 'so-detail' allocation.line.order.id %}">{% trans "Sales Order" %}: {{ allocation.line.order.pk }}</a></td>
<td><a href="{% url 'stock-item-detail' allocation.item.id %}">{% trans "Stock Item" %}: {{ allocation.item.id }}</a></td>
<td>{% decimal allocation.quantity %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
@ -32,23 +38,16 @@
$("#build-table").inventreeTable({ $("#build-table").inventreeTable({
columns: [ columns: [
{ {
title: 'Build', title: '{% trans "Order" %}',
sortable: true, sortable: true,
}, },
{ {
title: 'Making', title: '{% trans "Stock Item" %}',
sortable: true, sortable: true,
}, },
{ {
title: 'Allocated', title: '{% trans "Quantity" %}',
sortable: false, sortable: true,
formatter: function(value, row, index, field) {
return parseFloat(value);
},
},
{
title: 'Status',
sortable: false,
} }
] ]
}); });

View File

@ -31,7 +31,6 @@ from InvenTree.models import InvenTreeTree
from InvenTree.fields import InvenTreeURLField from InvenTree.fields import InvenTreeURLField
from part import models as PartModels from part import models as PartModels
from order import models as OrderModels
class StockLocation(InvenTreeTree): class StockLocation(InvenTreeTree):