[POS-commit] r6446 - stoqlib/trunk/stoqlib/domain

Johan Dahlin jdahlin at async.com.br
Thu Apr 26 13:06:28 BRT 2007


Author: jdahlin
Date: Thu Apr 26 13:06:28 2007
New Revision: 6446

Modified:
   stoqlib/trunk/stoqlib/domain/till.py

Log:
Send in the current station to this query too

Modified: stoqlib/trunk/stoqlib/domain/till.py
==============================================================================
--- stoqlib/trunk/stoqlib/domain/till.py	(original)
+++ stoqlib/trunk/stoqlib/domain/till.py	Thu Apr 26 13:06:28 2007
@@ -165,7 +165,9 @@
 
         # Make sure that the till has not been opened today
         today = datetime.datetime.today().date()
-        if Till.select(Till.q.opening_date >= today, connection=conn):
+        if Till.select(AND(Till.q.opening_date >= today,
+                           Till.q.stationID == self.station.id),
+                       connection=conn):
             raise TillError(_("A till has already been opened today"))
 
         last_till = self._get_last_closed_till()


More information about the POS-commit mailing list