Skip to content

Commit

Permalink
[FIX] account_payment_order: out of index date
Browse files Browse the repository at this point in the history
If we had a payment order with no lines we'll be getting an index error.
Better to avoid it having an empty recordset.
  • Loading branch information
chienandalu committed Jul 16, 2024
1 parent 572523f commit a081876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_payment_order/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ def _prepare_move_line_default_vals(self, write_off_line_vals=None):
if not self.payment_order_id:
return vals_list
for vals in vals_list:
vals["date_maturity"] = self.payment_line_ids[0].date
vals["date_maturity"] = self.payment_line_ids[:1].date
return vals_list

0 comments on commit a081876

Please sign in to comment.