pos_order.py 407 Bytes
Newer Older
Etienne Freiss committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import api, models


class PosOrder(models.Model):
    _inherit = 'pos.order'

    @api.model
    def _process_order(self, order):
        lines = order['lines']
        order['lines'] = [l for l in lines if l[2]['qty'] !=0]
                
        return super(PosOrder, self)._process_order(order)