diff --git a/frepple/controllers/outbound.py b/frepple/controllers/outbound.py
index 6d47a0f..c67b487 100644
--- a/frepple/controllers/outbound.py
+++ b/frepple/controllers/outbound.py
@@ -2765,13 +2765,20 @@ def export_orderpoints(self):
)
if not item:
continue
+ warehouse = (
+ self.warehouses.get(i["warehouse_id"][0])
+ if i["warehouse_id"]
+ else None
+ )
+ if not warehouse:
+ continue
uom_factor = self.convert_qty_uom(
1.0,
i["product_uom"][0],
self.product_product[i["product_id"][0]]["template"],
)
yield ' \n' % (
- quoteattr("%s @ %s" % (item["name"], i["warehouse_id"][1])),
+ quoteattr("%s @ %s" % (item["name"], warehouse)),
((i["product_min_qty"] or 0) * uom_factor),
((i["product_max_qty"] or 0) * uom_factor),
quoteattr(item["name"]),
@@ -2800,12 +2807,19 @@ def export_orderpoints(self):
)
if not item:
continue
+ warehouse = (
+ self.warehouses.get(i["warehouse_id"][0])
+ if i["warehouse_id"]
+ else None
+ )
+ if not warehouse:
+ continue
uom_factor = self.convert_qty_uom(
1.0,
i["product_uom"][0],
self.product_product[i["product_id"][0]]["template"],
)
- name = "%s @ %s" % (item["name"], i["warehouse_id"][1])
+ name = "%s @ %s" % (item["name"], warehouse)
if i["product_min_qty"]:
yield """