Browse Source

Add files via upload

pull/29/head
Houssine BAKKALI 7 years ago
committed by GitHub
parent
commit
0be3495bb6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      beesdoo_pos_remove_0_qty/models/pos_order.py

19
beesdoo_pos_remove_0_qty/models/pos_order.py

@ -0,0 +1,19 @@
# -*- 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):
print order
print order['lines']
lines = order['lines']
order['lines'] = [l for l in lines if l[2]['qty'] !=0]
print order['lines']
print order
return super(PosOrder, self)._process_order(order)
Loading…
Cancel
Save