[POS-commit] r7457 - stoq/trunk/stoq/gui/pos
romaia at async.com.br
romaia at async.com.br
Thu Feb 28 16:04:53 BRT 2008
Author: romaia
Date: Thu Feb 28 16:04:53 2008
New Revision: 7457
Log:
My preview commit didn't fix the issue correctly
Change the value returned by _coupon_add_item()
Modified:
stoq/trunk/stoq/gui/pos/pos.py
Modified: stoq/trunk/stoq/gui/pos/pos.py
==============================================================================
--- stoq/trunk/stoq/gui/pos/pos.py (original)
+++ stoq/trunk/stoq/gui/pos/pos.py Thu Feb 28 16:04:53 2008
@@ -206,8 +206,7 @@
argument
"""
if new_item:
- # Only add to the coupon if we really have one.
- if self._coupon and self._coupon_add_item(sale_item) == -1:
+ if self._coupon_add_item(sale_item) == -1:
return
self.sale_items.append(sale_item)
else:
@@ -586,8 +585,16 @@
return coupon
def _coupon_add_item(self, sale_item):
+ """Adds an item to the coupon.
+
+ Should return -1 if the coupon was not added, but will return None if
+ CONFIRM_SALES_ON_TILL is true
+
+ See L{stoqlib.gui.fiscalprinter.FiscalCoupon} for more information
+ """
if self.param.CONFIRM_SALES_ON_TILL:
- return -1
+ return
+
if self._coupon is None:
coupon = self._open_coupon()
if not coupon:
More information about the POS-commit
mailing list