Skip to content

Commit

Permalink
[FIX] agreement_rebate: Settlement lines already invoiced are invoice…
Browse files Browse the repository at this point in the history
…d twice when process the settlement in tow steps

TT52964
  • Loading branch information
sergio-teruel authored and CarlosRoca13 committed Jan 29, 2025
1 parent 772d6cb commit 9339abe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agreement_rebate/models/agreement_rebate_settlement.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def _reverse_type_map(self, inv_type):

def create_invoice(self):
invoice_dic = {}
for line in self.mapped("line_ids"):
for line in self.mapped("line_ids").filtered(
lambda ln: ln.invoice_status == "to_invoice"
):
key = line._get_invoice_key()
if key not in invoice_dic:
invoice_dic[key] = line._prepare_invoice()
Expand Down

0 comments on commit 9339abe

Please sign in to comment.