diff --git a/product/ERP5/Document/InventoryLine.py b/product/ERP5/Document/InventoryLine.py index 80db2f7290e1ef4b2022a43f10f11a36672c25ce..71141b47cbbc3b1da9a99cfc1ddafc996815c5c3 100644 --- a/product/ERP5/Document/InventoryLine.py +++ b/product/ERP5/Document/InventoryLine.py @@ -108,12 +108,14 @@ class InventoryLine(DeliveryLine): if not self.hasCellContent(): # First check if quantity already exists quantity = self._baseGetQuantity() - if quantity not in (0.0, 0, None): + if quantity not in (0.0,0,None): return quantity # Make sure inventory is defined somewhere (here or parent) - if getattr(aq_base(self), 'inventory', None) is None: - return 0.0 # No inventory defined, so no quantity - return self.getInventory() + _marker = [] + inventory = getattr(aq_base(self), 'inventory', _marker) + if inventory is not _marker: + return inventory + return quantity else: return None