Houssine BAKKALI
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
19 additions and
0 deletions
-
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) |