Fix bug for inventory batch when product not found

This commit is contained in:
Lance Edgar 2018-07-09 21:28:36 -05:00
parent c88d060fe0
commit 44663fe548

View file

@ -382,7 +382,7 @@ class InventoryBatchView(BatchMasterView):
force_unit_item = True # TODO: make configurable?
unit_forced = False
if force_unit_item and product.is_pack_item():
if force_unit_item and product and product.is_pack_item():
product = product.unit
unit_forced = True