Skip to content

Commit

Permalink
sale_recurring_payment: subs directly from invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Mar 15, 2024
1 parent b7c49bd commit 17ebae0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sale_recurring_payment_mollie/models/payment_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ def _mollie_prepare_payment_payload(self, api_type):
)._mollie_prepare_payment_payload(api_type)

if self._context.get("first_mollie_payment"):
name = (
self.sale_order_ids
and self.sale_order_ids.name
or self.invoice_ids
and self.invoice_ids.name
)
payment_data.update(
{
"description": f"First payment for {self.sale_order_ids.name} / {self.sale_order_ids.order_line.product_id.name}",
"description": f"First payment for {name}",
"sequenceType": "first",
}
)
Expand Down

0 comments on commit 17ebae0

Please sign in to comment.