[FIX] point_of_sale: don't group move lines if debit and credit
authorMartin Trigaux <mat@openerp.com>
Wed, 26 Jun 2013 09:34:12 +0000 (11:34 +0200)
committerMartin Trigaux <mat@openerp.com>
Wed, 26 Jun 2013 09:34:12 +0000 (11:34 +0200)
lp bug: https://launchpad.net/bugs/1127114 fixed

bzr revid: mat@openerp.com-20130626093412-or5k3eznjsxbvgu3

addons/point_of_sale/point_of_sale.py

index 9e0023f..cd87117 100644 (file)
@@ -973,11 +973,11 @@ class pos_order(osv.osv):
                 })
 
                 if data_type == 'product':
-                    key = ('product', values['partner_id'], values['product_id'])
+                    key = ('product', values['partner_id'], values['product_id'], values['debit'] > 0)
                 elif data_type == 'tax':
-                    key = ('tax', values['partner_id'], values['tax_code_id'],)
+                    key = ('tax', values['partner_id'], values['tax_code_id'], values['debit'] > 0)
                 elif data_type == 'counter_part':
-                    key = ('counter_part', values['partner_id'], values['account_id'])
+                    key = ('counter_part', values['partner_id'], values['account_id'], values['debit'] > 0)
                 else:
                     return