[FIX] point_of_sale: if an order fails to mark as PAID, leave it at NEW so that the...
authorFrédéric van der Essen <fva@openerp.com>
Mon, 24 Feb 2014 15:08:30 +0000 (16:08 +0100)
committerFrédéric van der Essen <fva@openerp.com>
Mon, 24 Feb 2014 15:08:30 +0000 (16:08 +0100)
bzr revid: fva@openerp.com-20140224150830-5uddv7i1djff2aip

addons/point_of_sale/point_of_sale.py

index 01e7a49..912a140 100644 (file)
@@ -561,7 +561,11 @@ class pos_order(osv.osv):
                     'journal': cash_journal.id,
                 }, context=context)
             order_ids.append(order_id)
-            self.signal_paid(cr, uid, [order_id])
+
+            try:
+                self.signal_paid(cr, uid, [order_id])
+            except Exception as e:
+                _logger.error('ERROR: Could not mark POS Order as Paid.\n'+str(e))
 
             if to_invoice:
                 self.action_invoice(cr, uid, [order_id], context)