From 6dc65f1aa5069e920740487f34924ae9cfa241f9 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 30 Mar 2020 11:33:39 -0500 Subject: [PATCH] Update various warnings to use product upc --- .../importing/db/exporters/catapult_inventory.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py b/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py index 4d58a13..5f4983b 100644 --- a/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py +++ b/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py @@ -142,12 +142,12 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo return if not item_id.isdigit(): - log.debug("product has non-numeric upc %s: %s", - item_id, product) + log.debug("product %s has non-numeric upc: %s", + product.upc, product) return if self.ignored_upcs and item_id in self.ignored_upcs: - log.debug("ignoring UPC %s for product: %s", item_id, product) + log.debug("ignoring UPC %s for product: %s", product.upc, product) return is_plu = False @@ -167,7 +167,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo department = product.department if not department: logger = log.warning if self.warn_missing_department else log.debug - logger("item_id %s has no department: %s", item_id, product) + logger("product %s has no department: %s", product.upc, product) return price_divider = None @@ -176,7 +176,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo diff = (product.quantity * product.normal_price) - product.group_price if abs(round(diff, 2)) > .01: log.warning("product %s has multi-price with $%0.2f diff: %s", - item_id, diff, product) + product.upc, diff, product) price_divider = product.quantity sold_by_ea_or_lb = None