Skip to content
Snippets Groups Projects
Commit 1750b902 authored by luc-demeyer's avatar luc-demeyer Committed by qdp-odoo
Browse files

[FIX] account: fixed group_lines method of invoices.

The group_lines method didn't make the sum of the quantity field, hence resulting in incorrect results when making product based statistics from the account.move.line records.

Courtesy of Luc De Meyer. Was PR #10551
parent 9007ed4c
No related branches found
No related tags found
No related merge requests found
......@@ -781,6 +781,9 @@ class account_invoice(models.Model):
line2[tmp]['tax_amount'] += l['tax_amount']
line2[tmp]['amount_currency'] += l['amount_currency']
line2[tmp]['analytic_lines'] += l['analytic_lines']
qty = l.get('quantity')
if qty:
line2[tmp]['quantity'] = line2[tmp].get('quantity', 0.0) + qty
else:
line2[tmp] = l
line = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment