Skip to content

Commit

Permalink
Merge PR #334 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 14, 2024
2 parents e2e46e2 + 1a88bcf commit 7cb09cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions account_invoice_report_grouped_by_picking/models/account_move.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2017-2023 Tecnativa - Carlos Dauden
# Copyright 2018 Tecnativa - David Vidal
# Copyright 2018-2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
Expand Down Expand Up @@ -140,7 +140,13 @@ def lines_grouped_by_picking(self):
remaining_qty -= qty
# To avoid to print duplicate lines because the invoice is a refund
# without returned goods to refund.
if self.move_type == "out_refund" and not has_returned_qty and picking_dict:
if (
self.move_type == "out_refund"
and not has_returned_qty
and picking_dict
and remaining_qty
and line.product_id.type != "service"
):
remaining_qty = 0.0
for key in picking_dict:
picking_dict[key] = abs(picking_dict[key])
Expand Down

0 comments on commit 7cb09cb

Please sign in to comment.