* finish the physical-item received workflow.
* how to model 'received' in the database?
+* if someone has item checked out, show due date/time on item-about page.
+
* does 'move to new heading' show up in the right places? Should be like 'edit'.
* a short-number for physical items. Sort of a barcode, but intended
and a friendly description of the physical item's status"""
if self.item_type != 'PHYS':
return False, _('(Not a physical item)')
-
- #fixme: just having barcode in item-metadata doesn't mean 'in Reserves'
+ # An item is 'in Reserves' if we know its barcode, and if we
+ # have a live PhysicalObject record for it.
bc = self.barcode()
- if not bc:
+ if (not bc) or (not PhysicalObject.by_barcode(bc)):
return False, _('On order')
else:
+ # We need to check with the ILS to see if anyone has it out.
status = lib_integration.item_status(bc)
return status['available'], _(status['status'])