Update various warnings to use product upc
This commit is contained in:
parent
45f05032fb
commit
6dc65f1aa5
|
@ -142,12 +142,12 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
return
|
return
|
||||||
|
|
||||||
if not item_id.isdigit():
|
if not item_id.isdigit():
|
||||||
log.debug("product has non-numeric upc %s: %s",
|
log.debug("product %s has non-numeric upc: %s",
|
||||||
item_id, product)
|
product.upc, product)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.ignored_upcs and item_id in self.ignored_upcs:
|
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
|
return
|
||||||
|
|
||||||
is_plu = False
|
is_plu = False
|
||||||
|
@ -167,7 +167,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
department = product.department
|
department = product.department
|
||||||
if not department:
|
if not department:
|
||||||
logger = log.warning if self.warn_missing_department else log.debug
|
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
|
return
|
||||||
|
|
||||||
price_divider = None
|
price_divider = None
|
||||||
|
@ -176,7 +176,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
diff = (product.quantity * product.normal_price) - product.group_price
|
diff = (product.quantity * product.normal_price) - product.group_price
|
||||||
if abs(round(diff, 2)) > .01:
|
if abs(round(diff, 2)) > .01:
|
||||||
log.warning("product %s has multi-price with $%0.2f diff: %s",
|
log.warning("product %s has multi-price with $%0.2f diff: %s",
|
||||||
item_id, diff, product)
|
product.upc, diff, product)
|
||||||
price_divider = product.quantity
|
price_divider = product.quantity
|
||||||
|
|
||||||
sold_by_ea_or_lb = None
|
sold_by_ea_or_lb = None
|
||||||
|
|
Loading…
Reference in a new issue