~openerp/openobject-addons/saas-3

« back to all changes in this revision

Viewing changes to point_of_sale/point_of_sale.py

  • Committer: Denis Ledoux
  • Date: 2014-05-19 13:36:48 UTC
  • mfrom: (8472.1.1584 trunk)
  • Revision ID: dle@openerp.com-20140519133648-rushs310hor2nzox
[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10056 revid:dle@openerp.com-20140519133339-uxb01aik1z8wu1sy

Show diffs side-by-side

added added

removed removed

Lines of Context:
565
565
            try:
566
566
                self.signal_paid(cr, uid, [order_id])
567
567
            except Exception as e:
568
 
                _logger.error('Could not mark POS Order as Paid: %s', tools.ustr(e))
 
568
                _logger.error('Could not fully process the POS Order: %s', tools.ustr(e))
569
569
 
570
570
            if to_invoice:
571
571
                self.action_invoice(cr, uid, [order_id], context)
725
725
        move_obj = self.pool.get('stock.move')
726
726
 
727
727
        for order in self.browse(cr, uid, ids, context=context):
728
 
            if not order.state=='draft':
729
 
                continue
730
728
            addr = order.partner_id and partner_obj.address_get(cr, uid, [order.partner_id.id], ['delivery']) or {}
731
729
            picking_id = picking_obj.create(cr, uid, {
732
730
                'origin': order.name,
1167
1165
        return self.write(cr, uid, ids, {'state': 'payment'}, context=context)
1168
1166
 
1169
1167
    def action_paid(self, cr, uid, ids, context=None):
 
1168
        self.write(cr, uid, ids, {'state': 'paid'}, context=context)
1170
1169
        self.create_picking(cr, uid, ids, context=context)
1171
 
        self.write(cr, uid, ids, {'state': 'paid'}, context=context)
1172
1170
        return True
1173
1171
 
1174
1172
    def action_cancel(self, cr, uid, ids, context=None):