[open-ils-commits] r281 - in servres/trunk/conifer: . syrup (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 5 17:32:15 EDT 2009
Author: gfawcett
Date: 2009-04-05 17:32:10 -0400 (Sun, 05 Apr 2009)
New Revision: 281
Modified:
servres/trunk/conifer/TODO
servres/trunk/conifer/syrup/models.py
Log:
clarify how the model knows if an item is 'in Reserves' or not
A live PhysicalObject record is the authoritative source.
Modified: servres/trunk/conifer/TODO
===================================================================
--- servres/trunk/conifer/TODO 2009-04-05 21:25:54 UTC (rev 280)
+++ servres/trunk/conifer/TODO 2009-04-05 21:32:10 UTC (rev 281)
@@ -5,6 +5,8 @@
* 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
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2009-04-05 21:25:54 UTC (rev 280)
+++ servres/trunk/conifer/syrup/models.py 2009-04-05 21:32:10 UTC (rev 281)
@@ -481,12 +481,13 @@
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'])
More information about the open-ils-commits
mailing list