You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
407 B

  1. # -*- coding: utf-8 -*-
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from openerp import api, models
  4. class PosOrder(models.Model):
  5. _inherit = 'pos.order'
  6. @api.model
  7. def _process_order(self, order):
  8. lines = order['lines']
  9. order['lines'] = [l for l in lines if l[2]['qty'] !=0]
  10. return super(PosOrder, self)._process_order(order)