summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2014-05-19 15:33:39 +0200
committerDenis Ledoux <dle@openerp.com>2014-05-19 15:33:39 +0200
commita8a085eabbc477989676f7262da59e2f30952e4e (patch)
treefe3894d519dfc5d2da09048f9b89e97075ab56a8
parentde802a9c1afda119fedc5e5e9061a095cea484f4 (diff)
[FIX] point_of_sale: opw-607551, mark the pos order as paid before trying to create the picking, so in case the picking could not be created for one reason or another, the pos order workflow process continue.
This commit partially reverts rev. 6036 revid:fp@tinyerp.com-20111219220053-tn5gc1lmc13fjpyf, the second part of this commit already has been revert in a previous revision.
-rw-r--r--addons/point_of_sale/point_of_sale.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 76c48d24f80..2768cf8aa44 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -537,7 +537,7 @@ class pos_order(osv.osv):
try:
wf_service.trg_validate(uid, 'pos.order', order_id, 'paid', cr)
except Exception:
- _logger.error('ERROR: Could not mark POS Order as Paid.', exc_info=True)
+ _logger.error('ERROR: Could not fully process the POS Order', exc_info=True)
return order_ids
def write(self, cr, uid, ids, vals, context=None):
@@ -692,8 +692,6 @@ class pos_order(osv.osv):
move_obj = self.pool.get('stock.move')
for order in self.browse(cr, uid, ids, context=context):
- if not order.state=='draft':
- continue
addr = order.partner_id and partner_obj.address_get(cr, uid, [order.partner_id.id], ['delivery']) or {}
picking_id = picking_obj.create(cr, uid, {
'origin': order.name,
@@ -1136,8 +1134,8 @@ class pos_order(osv.osv):
return self.write(cr, uid, ids, {'state': 'payment'}, context=context)
def action_paid(self, cr, uid, ids, context=None):
- self.create_picking(cr, uid, ids, context=context)
self.write(cr, uid, ids, {'state': 'paid'}, context=context)
+ self.create_picking(cr, uid, ids, context=context)
return True
def action_cancel(self, cr, uid, ids, context=None):