mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_payment_order: out of index date
If we had a payment order with no lines we'll be getting an index error. Better to avoid it having an empty recordset.
This commit is contained in:
@@ -61,5 +61,5 @@ class AccountPayment(models.Model):
|
|||||||
if not self.payment_order_id:
|
if not self.payment_order_id:
|
||||||
return vals_list
|
return vals_list
|
||||||
for vals in 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
|
return vals_list
|
||||||
|
|||||||
Reference in New Issue
Block a user