Commit 53cb1f53 by François C.

Merge branch '#1965' into 'dev_cooperatic'

#1965 Dans le module Inventaire, des commandes passées en caisse ne sont pas impactées dans les stocks

See merge request !19
parents 72e81ad2 d2f56e44
# -*- coding: utf-8 -*-
from . import models
# -*- coding: utf-8 -*-
# Copyright (C) 2016-Today: BEES coop (<http://www.bees-coop.be/>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Beesdoo - Remove pos order line with quantity set to 0',
'version': '9.0.1.0.0',
'category': 'Custom',
'summary': 'Remove pos order line with quantity set to 0',
'description': """
This module fix the issue on picking when there is two lines on
the pos order for the same product, with one of lines with a 0 quantity.
The lines at 0 are removed before the pos order is processed to avoid
such issue.
""",
'author': 'BEES coop - Houssine BAKKALI',
'website': 'http://www.bees-coop.be',
'depends': [
'point_of_sale',
],
'data': [],
'installable': True,
}
# -*- coding: utf-8 -*-
from . import pos_order
# -*- 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)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment