From: Kersten Jeremy Date: Wed, 7 May 2014 12:01:44 +0000 (+0200) Subject: [FIX] POS - Write the state to Paid before the create_picking. It's allow to stay... X-Git-Tag: InsPy_master01~40^2~9^2~1 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=ada19d175d530b616f88e7c3d81ec194f7ad6a0d;p=odoo%2Fodoo.git [FIX] POS - Write the state to Paid before the create_picking. It's allow to stay in a valid state in workflow. And let the current stock picking out to 'Ready for delivery' bzr revid: jke@openerp.com-20140507120144-m177kqxa3fbfl37r --- diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 3480ab4..0a2b96f 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -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):