[FIX] POS - Write the state to Paid before the create_picking. It's allow to stay...
authorKersten Jeremy <jke@openerp.com>
Wed, 7 May 2014 12:01:44 +0000 (14:01 +0200)
committerKersten Jeremy <jke@openerp.com>
Wed, 7 May 2014 12:01:44 +0000 (14:01 +0200)
bzr revid: jke@openerp.com-20140507120144-m177kqxa3fbfl37r

addons/point_of_sale/point_of_sale.py

index 3480ab4..0a2b96f 100644 (file)
@@ -1167,8 +1167,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):