[FIX] point_of_sale: group pos entries by tax
Forward-port of dc975f3b0b which have
been forgotten during previous commit
This commit is contained in:
@@ -223,7 +223,7 @@ class PosOrder(models.Model):
|
||||
})
|
||||
|
||||
if data_type == 'product':
|
||||
key = ('product', values['partner_id'], (values['product_id'], values['name']), values['analytic_account_id'], values['debit'] > 0)
|
||||
key = ('product', values['partner_id'], (values['product_id'], tuple(values['tax_ids'][0][2]), values['name']), values['analytic_account_id'], values['debit'] > 0)
|
||||
elif data_type == 'tax':
|
||||
key = ('tax', values['partner_id'], values['tax_line_id'], values['debit'] > 0)
|
||||
elif data_type == 'counter_part':
|
||||
@@ -287,7 +287,7 @@ class PosOrder(models.Model):
|
||||
'analytic_account_id': self._prepare_analytic_account(line),
|
||||
'credit': ((amount > 0) and amount) or 0.0,
|
||||
'debit': ((amount < 0) and -amount) or 0.0,
|
||||
'tax_ids': [(6, 0, line.tax_ids.ids)],
|
||||
'tax_ids': [(6, 0, line.tax_ids_after_fiscal_position.ids)],
|
||||
'partner_id': partner_id
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user